I got my ODrive 3.5 this week, and have spent the weekend learning how much I don’t know. After having some difficulty getting odrivetool installed in standalone python on both windows and ubuntu, I was able to get it installed with anaconda3. Next step: connect the ODrive to the PC and install the driver. However, When I plug the usb cable into the ODrive and the windows machine, I get no new hardware notifications, and nothing new shows up in the device manager. zadig does not list the ODrive either. I have tried this on two different computers, with 2 different cables, and with and without the power supply connected (the getting started guide is a bit ambiguous on whether this is necessary). What am I missing?
This was the first batch of ODrives where we flashed the firmware on before sending it out. Our process is not so mature for this, so it could be the case that we have missed to flash your board.
Can you try to while powered off move the dip switch from “RUN” to “DFU”; then plug in USB, then apply DC power? If something shows up in device manager, you should be able to run
odrivetool dfu to flash firmware. Then unpower, set back to “run” and then hopefully it’s solved.
Thanks, I’ll give it a shot tomorrow.
So, the board does go into DFU mode, and is recognized by windows. However,
odrivetool dfu doesn’t flash the firmware, but just starts the tool:
(Odrive) c:\>odrivetool dfu ODrive control utility v0.4.0.post2 Please connect your ODrive. You can also type help() or quit() In :
I’ll try in ubuntu in a minute and report back.
Edit: I did go through the troubleshooting steps provided. The board shows up in device manager under “libusb-win32 devices” as “STM32 BOOTLOADER”
OK, ubuntu output:
$ odrivetool dfu ODrive control utility v0.4.0.post2 Waiting for ODrive... Traceback (most recent call last): File "/home/ben/pyenvs/odrive/bin/odrivetool", line 141, in <module> odrive.dfu.launch_dfu(args, logger, app_shutdown_token) File "/home/ben/pyenvs/odrive/lib/python3.5/site-packages/odrive/dfu.py", line 450, in launch_dfu update_device(device, firmware, logger, cancellation_token) File "/home/ben/pyenvs/odrive/lib/python3.5/site-packages/odrive/dfu.py", line 257, in update_device serial_number = device.serial_number File "/home/ben/pyenvs/odrive/lib/python3.5/site-packages/usb/core.py", line 830, in serial_number self._serial_number = util.get_string(self, self.iSerialNumber) File "/home/ben/pyenvs/odrive/lib/python3.5/site-packages/usb/util.py", line 314, in get_string raise ValueError("The device has no langid") ValueError: The device has no langid
I just made a hotfix to fix this issue on Windows. Can you get the new odrive package and try again?
pip install odrive --upgrade --no-cache-dir
Can you please log an issue on github about this? I’ll take a look when I get my Ubuntu machine up.
Thanks for the help and the hotfix.
The initial attempt to flash failed to automatically download the new firmware version:
(odrive) PS C:\> odrivetool dfu ODrive control utility v0.4.0.post3 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 375E365F3137 ([unknown version]) with firmware [unknown version] in DFU mode --------------------------------------------------------------------------- Exception Traceback (most recent call last) C:\pyenv\odrive\Scripts\odrivetool in <module>() 139 print_version() 140 import odrive.dfu --> 141 odrive.dfu.launch_dfu(args, logger, app_shutdown_token) 142 143 elif args.command == 'liveplotter': c:\pyenv\odrive\lib\site-packages\odrive\dfu.py in launch_dfu(args, logger, cancellation_token) 448 firmware = FirmwareFromFile(args.file) if args.file else None 449 --> 450 update_device(device, firmware, logger, cancellation_token) 451 452 c:\pyenv\odrive\lib\site-packages\odrive\dfu.py in update_device(device, firmware, logger, cancellation_token) 306 else: 307 suggestion = 'Run "make write_otp" to program the board version.' --> 308 raise Exception('Cannot check online for new firmware because the board version is unknown. ' + suggestion) 309 print("Checking online for newest firmware...", end='') 310 firmware = get_newest_firmware(hw_version) Exception: Cannot check online for new firmware because the board version is unknown. Run "make write_otp" to program the board version.
I tried “make write_otp” at the prompt, but the term ‘make’ wasn’t recognized. I downloaded the firmware .hex and tried again without programming the board version:
(odrive) PS C:\> odrivetool dfu ODriveFirmware_v3.5-48V.hex ODrive control utility v0.4.0.post3 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 375E365F3137 ([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 The configuration cannot be backed up because the device is already in DFU mode. The configuration may be lost after updating. Do you want to continue anyway? [Y/n] y Erasing... done Flashing... done Verifying... done Waiting for the device to reappear... --------------------------------------------------------------------------- TimeoutError
It timed out while i was fiddling with the DFU switch and the power cycle. After changing the switch to “RUN”, the board was recognized by windows, and I changed the driver to the libusb-win32 driver. Running odrivetool again, the board was still not recognized by odrivetool.
(odrive) PS C:\> odrivetool ODrive control utility v0.4.0.post3 Please connect your ODrive. You can also type help() or quit(). In : quit
Does the board version need to be written for the tool to work? If so, could you point me in the right direction to learn the implementation of the “make write_otp” command?
That’s good, well done.
Hmm so in zadig you changed the
ODrive 3.x Native Interface (Interface 2), not the other one? You shouldn’t need to write the OTP for it to show up. There is about 5-10s delay from starting odrivetool until the ODrive should show up.
If none of the above works, hit me up on Discord and we can do a remote session and I can take a look.
Nope, you got me. I changed the driver on Interface 1, and didn’t see the other one or pay enough attention to the getting started instructions. Thanks again.
2 posts were merged into an existing topic: Cannot flash firmware
I wanted to add my experience for reference.
I was not able to communicate with the Odrive at first. If I switched to DFU mode, the Odrive would appear and I could talk to it (I think - I may have had to use Zadig). However the odrive dfu tool would give me various errors - I do not believe any firmware was installed.
I then tried to use the DfuSe tool per these instructions to install the firmware. However, the tool could not see the odrive, so I had to uninstall the driver (while checking the delete files box). Windows would not automatically install a correct driver, so I used the driver from the DfuSe install per these instructions. Once I had this driver installed, I was able to flash the firmware then follow the normal procedure (switching back to run mode, then using Zadig to change the driver for Interface 2).
I have the same issue now, My Odrive v3.6 also not getting detected by windows using anaconda. I was updating firmware and then it went to STM32 boot loader, I had set the driver "STM boot loader " to libusb-win32 in Zadig utility then I installed the driver. Then the odrive is not detected. It didn’t show in Device manager I have checked with switching to DFU from RUN and STM32 boot loader is detected in device manager and I ran the command odrivetool dfu, then I disconnected and switched to RUN and checked device manager but it is not detecting. Is the drive dead? or any other issue?
Try flashing with an STLink V2, it should revive the board
Thanks, I will try flashing with STLink V2 and I am getting an Index error
This is a bug in
odrivetool which occurs when the ODrive is already in DFU mode when you start it. It is fixed on the devel branch. You can manually apply the fix by editing
C:\Users\Yashwanth\anaconda3\lib\site-packages\fibre\discovery.py line 179 with the change in the link above.
Line 177 would need to be removed.
In any case, this fix is now officially published. You can install it with
python3 -m pip install odrive --upgrade.