Odrive firmware is completely erased

Hello,

I have recently bought an odrive on Aliexpress and it had worked a few days without any problems. suddenly though, my odrive stopped working and my odrivetool on my laptop (I use a MacBook) didn’t find the odrive. After that I searched for help on this forum and somebody told me to install this file, which would reinstall the firmware on my odrive.“https://github.com/odriverobotics/ODrive/releases/download/fw-v0.5.3/ODriveFirmware_v3.6-56V.bin

when I run “odrivetool dfu ODriveFirmware_v3.6-56V.bin” in the terminal , which the person told me to do, I get this:
"MacBook-Pro-van-Cedric:Downloads cedricmillecamp$ odrivetool dfu ODriveFirmware_v3.6-56V.bin
ODrive control utility v0.5.3
Waiting for ODrive…
DFU mode is not supported on board version 3.4 or earlier.
This is because entering DFU mode on such a device would
break the brake resistor FETs under some circumstances.
Warning: DFU mode is not supported on ODrives earlier than v3.5 unless you perform a hardware mod.
Do you still want to continue? [y/N] y
Found ODrive 209030725432 ([unknown version]) with firmware [unknown version] in DFU mode

You are about to flash firmware [unknown version] which is the same version as the firmware on the device ([unknown version]).
Do you want to flash this firmware anyway? [y/N] y
Traceback (most recent call last):
File “/usr/local/bin/odrivetool”, line 143, in
odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
File “/usr/local/lib/python3.9/site-packages/odrive/dfu.py”, line 509, in launch_dfu
update_device(device, firmware, logger, cancellation_token)
File “/usr/local/lib/python3.9/site-packages/odrive/dfu.py”, line 369, in update_device
hexfile = IntelHex(firmware.get_as_hex())
File “/usr/local/lib/python3.9/site-packages/intelhex/init.py”, line 90, in init
self.loadhex(source)
File “/usr/local/lib/python3.9/site-packages/intelhex/init.py”, line 210, in loadhex
for s in fobj:
File “/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/codecs.py”, line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in position 5: invalid continuation byte

does anyone know what could solve this?

Kind regards
Cédric Millecamp

Flashing on Mac is a bit of a struggle. Try dfu-util ODrive Tool | ODrive

Also, aliexpress boards are not officially sold by ODrive, and not officially supported, since there’s no way for us to know what’s in it

Thank you for your answer,
I have tried that but that doesn’t work. the problem is that 100% of the software that is on my odrive is erased. When I put it in DFU mode, my computer recognizes the serial number of the odrive but it doesn’t recognize the type of my odrive (which is v3.6 56v).
So I need a method to completely flash all the software on my odrive

This is normal. In DFU mode, you are talking to a piece of software baked into the chip by ST, not the ODrive firmware.
It should be able to be flashed using dfu-util once it is in DFU mode.

Of course, you need to supply the filename as with odrivetool dfu.

thx for your answer,

what do you mean with :“Of course, you need to supply the filename as with odrivetool dfu”?

this is what I get:
"MacBook-Pro-van-Cedric:~ cedricmillecamp$ odrivetool dfu
ODrive control utility v0.5.3
Waiting for ODrive…
DFU mode is not supported on board version 3.4 or earlier.
This is because entering DFU mode on such a device would
break the brake resistor FETs under some circumstances.
Warning: DFU mode is not supported on ODrives earlier than v3.5 unless you perform a hardware mod.
Do you still want to continue? [y/N] y
Found ODrive 209030725432 ([unknown version]) with firmware [unknown version] in DFU mode
Traceback (most recent call last):
File “/usr/local/bin/odrivetool”, line 143, in
odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
File “/usr/local/lib/python3.9/site-packages/odrive/dfu.py”, line 509, in launch_dfu
update_device(device, firmware, logger, cancellation_token)
File “/usr/local/lib/python3.9/site-packages/odrive/dfu.py”, line 345, in update_device
raise Exception('Cannot check online for new firmware because the board version is unknown. ’ + suggestion)
Exception: Cannot check online for new firmware because the board version is unknown. Run “make write_otp” to program the board version.
MacBook-Pro-van-Cedric:~ cedricmillecamp$ "

I mean that you need to do something like:
dfu-util -D ODriveFirmware_v3.6-56V.bin
with the ODrive connected in DFU mode.