DAVEGA X Updates

DAVEGA X installer for v4.00

As some of you might have noticed, we’ve been testing a new firmware version for the DAVEGA. This is a completely new concept. There will no longer be two parts – “bootloader” and “firmware” – each with a different version. There will only be a single firmware version henceforth.

The bad news is that you will no longer be able to have multiple firmware versions installed at the same time. I don’t think this is a big deal.

The good news, however, is that you will be able to do ALL firmware updates over the WiFi. No more fiddling with the USB port when you need to get the bootloader upgraded. This actually is quite a big deal. Plus, you can still select between various firmware versions. If you don’t like the latest update, no problem. Just downgrade back. The only difference is that now the firmware always needs to be downloaded from the server so switching takes longer than before. It’s just about a minute though.

What else is new?

Check the CHANGELOG for the complete list of changes.

A few things I would like to highlight:

RX/TX negotiation. If you now swap the RX/TX wires (whether that’s by accident or on purpose because you don’t want the wires to cross), it will work just fine. The next batch of PCBs will have the pins labeled RX/TX, RX/TX, instead of RX, TX.

No more memory errors. I haven’t seen a single memory error since updating to v4. I believe this is finally fixed.

Processing data from all VESCs on CAN. Before, DAVEGA would only get the data from the single VESC it’s directly connected to and interpolate the values for the unseen VESCs. Now it sees all VESCs on CAN so the calculations are more accurate. Starting from v4.04 you can also view some values per VESC:

VESC compatibility restricted to v3.48-v5.02. Obviously, this isn’t something I’m presenting as an improvement. It’s just important to know. This was a design decision that made implementing the CAN-forwarded communication a whole lot easier. I don’t see any strong reasons for preferring the Ackmaniac’s firmware, the Unity legacy firmware, or the pre-v3.48 standard firmware over the standard v5.01. I’m open to discussion though and I don’t rule out the possibility to re-enable the support for these firmware version should there be demand for it.

How do I upgrade?

See the upgrade instructions here: Upgrade to v4.00 - DAVEGA

There’s a special installer, similar to the DAVEGA X Tool but more user-friendly. You just download and run the executable. It will identify your device ID and download all required data from the davega.eu server. You just respond to simple yes/no questions.

The installer is currently only available for Mac OS. I’m still working on the Windows version. It should be available by Monday-ish.

Here’s what the upgrade looks like:

$ ./davegax-v4-installer
davegax-v4-installer v1.0

This will install the firmware version 4.00 on your DAVEGA X.
Before you proceed, it's recommended that you create an online backup:
Menu > Update & Backup > Backup > backup config & data

Make sure you have the CP2102 drivers installed and connect your DAVEGA to the USB port.
You will also need internet connection.
Ready? [y/n]: y

Auto-detecting DAVEGA X port...
2 serial ports found.
Trying /dev/cu.SLAB_USBtoUART ...
Connecting.......
Success!
Port detected successfully!

Getting the device ID...
Connecting....
Device ID: ********

Getting the license key for your device...
Verifying the license key...
Looks good!

Exporting data to /Users/xpomikal/PycharmProjects/davega_x/davegax-v4-installer/dist/backup.dfs...
Getting the list of files...
Exporting file: /data/config.json
Exporting file: /data/odometer1.json
Exporting file: /data/odometer2.json
Exporting file: /data/orientation
Export successful!

Fetching the firmware file...
Downloaded successfully.

Upgrading to v4....
esptool.py v3.0
Serial port /dev/cu.SLAB_USBtoUART
Connecting.......
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: ********
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 1564064 bytes to 986115...
Wrote 1564064 bytes (986115 compressed) at 0x00001000 in 23.8 seconds (effective 525.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Upgrade successful!

Installing the license key...
Failed to enter raw REPL mode.
Retrying...
Creating file: /license
License key installed!

Restoring backup...
Creating directory: /data
Creating file: /data/config.json
Creating file: /data/odometer1.json
Creating file: /data/odometer2.json
Creating file: /data/orientation
Backup restored!

All done successfully! Yay!
Press enter to continue...
16 Likes