Odrivetool doesn't find odrive on MacBook Pro

Hi everyone,

i am new to the drive community so forgive me if I doen’t know the obvious :wink:

I have recently bought a odrive v3.6 56v and it has been working for two days without any major problems, it had only once before had connecting issues but after connecting the cable to my computer (a MacBook) a few times, the odrivetool found my odrive and I could continue working and exploring.

Yesterday though, I typed this command in my odrivetool in the terminal “odrv0.axis0.config.startup_motor_calibration = True” and then I saved the configuration “odrv0.save_configuration()”. after doing this, the odrivetool stopped connecting to my odrive and after endless times of reconnecting the odrive cable to my computer, the odrivetool still doesn’t find my odrive.

I really don’t know what the problem is and I hope that one of you guys might be able to help me.

Kind regards
Cedric

… Hmm. That’s a new one.

Try putting the ODrive in DFU mode, then flashing new firmware to it. This should erase your configuration.

thanks for your reply!

I have already tried that and unfortunately that doesn’t work, when I do the DFU mode process I get this:
odrivetool dfu ODrive control utility v0.5.2.post0 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 148, in odrive.dfu.launch_dfu(args, logger, app_shutdown_token) File “/usr/local/lib/python3.9/site-packages/odrive/dfu.py”, line 471, in launch_dfu update_device(device, firmware, logger, cancellation_token) File “/usr/local/lib/python3.9/site-packages/odrive/dfu.py”, line 321, 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$ odrivetool\ dfu\

it seems like everything on my odrive is erased and that the odrivetool doesn’t recognize which version my odrive is.
when I type this “make write_otp” as the script above suggests, I get this “MacBook-Pro-van-Cedric:~ cedricmillecamp$ make write_otp
make: *** No rule to make target `write_otp’. Stop.
MacBook-Pro-van-Cedric:~ cedricmillecamp$”

any idea what else I could try?

kind regards
Cedric Millecamp

Where’d you get this board? Sounds like it’s 100% totally erased. Hook up an STLink and flash it using one of the backup procedures, or download the firmware and use odrivetool dfu <path/to/file> as described in the docs

I got it on Aliexpress and I have 3 more on the way hahaha. thanks for the help, I will try to do this tomorrow and I will let you know if it works.

Kind regards
Cedric Millecamp

Oh, yeah. 0.5.2 doesn’t boot non-genuine odrive boards and you can’t flash them because they’re missing the OTP. Download 0.5.3 from github and flash it explicitly. It should boot, but odrivetool will now show a warning.

thanks,
So how exactly should I do this, I have installed odrivetool version 0.5.3 on my computer. should I now just try to flash the firmware again via the DFU mode on my odrive?

So what do you mean by “flash it explicitly” because I tried flashing my odrive the same way that I did it before now that I have version 0.5.3 installed, but it still shows the same message.

explicitly in that you can’t use odrivetool dfu with no arguments (because that will try to determine the board version and download the appropriate firmware automatically, but your board does not identify its version)
So instead you have to pass the file as an argument i.e. odrivetool dfu Firmware/build/ODriveFirmware.hex if you built it from source
or odrivetool dfu ~/Downloads/OdriveFirmware_V0.5.3_v3.6_56V.bin if you downloaded it.

thanks!
I tried “odrivetool dfu ~/Downloads/OdriveFirmware_V0.5.3_v3.6_56V.bin” but then it gives this: "odrivetool dfu ~/Downloads/OdriveFirmware_V0.5.3_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 199, in loadhex
fobj = open(fobj, “r”)
FileNotFoundError: [Errno 2] No such file or directory: ‘/Users/cedricmillecamp/Downloads/OdriveFirmware_V0.5.3_v3.6_56V.bin’ "

when I try “odrivetool dfu Firmware/build/ODriveFirmware.hex” it gives this "odrivetool dfu Firmware/build/ODriveFirmware.hex
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 199, in loadhex
fobj = open(fobj, “r”)
FileNotFoundError: [Errno 2] No such file or directory: ‘Firmware/build/ODriveFirmware.hex’ "
so unfortunately both of them don’t work. Am I doing something wrong?

Kind regards
Cedric Millecamp

Errr, obviously you need to compile or download the file before you flash it. :stuck_out_tongue:
Those filenames were examples.

Download the file here: https://github.com/odriverobotics/ODrive/releases/download/fw-v0.5.3/ODriveFirmware_v3.6-56V.bin
Then make sure you are in the directory where you downloaded it to, and run
odrivetool dfu ODriveFirmware_v3.6-56V.bin

Hahaha sorry for that, i am just new to this and i am missing the obvious.
Thanks for the help.
And what do you mean with that i should be in the directory where i downloaded the file to?

my computer doesn’t seem able to open the file that you linked because it is in .bin format. could you maybe send a link in a different format?

You don’t need to ‘open’ it, just use the command above.

yes I tried that, so I downloaded the link that you sent and then I ran the command in the terminal but then I still get this: "MacBook-Pro-van-Cedric:~ 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 199, in loadhex
fobj = open(fobj, “r”)
FileNotFoundError: [Errno 2] No such file or directory: ‘ODriveFirmware_v3.6-56V.bin’ "

so I thought that the problem was that my computer can’t open .bin files