ODrive V3.6 Connection Issue

Hello!

I’m looking to connect to my Odrive V3.6 56V. I’m getting the following error in Anaconda:

[WARNING:odrive] Found ODrive 208B39874D4D but odrivetool could not connect to it: operation failed with <LibODriveError.UNEXPECTED_RESPONSE_LENGTH: 6>

I have set my drivers in Zadig to:
ODrive 3.6 Native Interface (Interface 2) - libusb-win32 (v1.4.0.0)
ODrive 3.6 CDC Interface (Interface 0) - USB Serial (CDC)

Any help would be greatly appreciated!

Hi! Do you know what firmware version this is running? If it’s firmware version 0.5.4 or earlier, you may need to downgrade odrivetool:

pip uninstall odrive
pip install odrive==0.5.4

Or you can just upgrade the firmware (switch in DFU, odrivetool legacy-dfu).

Hi Solomon, thanks for the reply!

I managed to downgrade odrivetool and connect. I then attempted to update the firmware with the dip switch in the DFU position. It looks like the odrivetool dfu command successfully erased the old firmware, but wasn’t able to flash any of the new firmware?

(base) C:\Users\taitl>odrivetool dfu
ODrive control utility v0.5.4
DFU is unreliable on Windows. If it fails, please use the DFU switch to force DFU mode. You can also try the developer preview of odrivetool with python -m pip install odrive --upgrade --pre.
Also see https://docs.odriverobotics.com/odrivetool#upgrading-firmware-with-a-different-dfu-tool for other options.
Waiting for ODrive…
Found ODrive 208B39874D4D (v3.6-56V) with firmware [unknown version] in DFU mode
Checking online for newest firmware… found v0.5.4
Downloading firmware v0.5.4…
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… (sector 0/7)

RuntimeError Traceback (most recent call last)
File ~\anaconda3\Scripts\odrivetool:149
144 logger.warn("DFU is unreliable on Windows. If it fails, please use "
145 "the DFU switch to force DFU mode. You can also try the "
146 “developer preview of odrivetool with python -m pip install odrive --upgrade --pre.\n”
147 “Also see https://docs.odriverobotics.com/odrivetool#upgrading-firmware-with-a-different-dfu-tool for other options.”)
148 import odrive.dfu
→ 149 odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
151 elif args.command == ‘unlock’:
152 print_version()

File ~\anaconda3\Lib\site-packages\odrive\dfu.py:512, in launch_dfu(args, logger, cancellation_token)
509 device = devices[0] or devices[1]
510 firmware = FirmwareFromFile(args.file) if args.file else None
→ 512 update_device(device, firmware, logger, cancellation_token)

File ~\anaconda3\Lib\site-packages\odrive\dfu.py:434, in update_device(device, firmware, logger, cancellation_token)
432 for i, (sector, data) in enumerate(touched_sectors):
433 print(“Flashing… (sector {}/{}) \r”.format(i, len(touched_sectors)), end=‘’, flush=True)
→ 434 dfudev.write_sector(sector, data)
435 print(‘Flashing… done \r’, end=‘’, flush=True)
436 finally:

File ~\anaconda3\Lib\site-packages\odrive\dfuse\DfuDevice.py:219, in DfuDevice.write_sector(self, sector, data)
217 status = self.wait_while_state(DfuState.DFU_DOWNLOAD_BUSY)
218 if status[1] != DfuState.DFU_DOWNLOAD_IDLE:
→ 219 raise make_exception(status)

RuntimeError: An error occured. Device Status: (0, 2, 0, 0)

Unfortunately the cause is said at the top of the message – DFU is unreliable on Windows :slight_smile:

There’s a workaround or two, but quick question – where’d you get this ODrive? Is it from our shop, or somewhere else? Because everything we sell should be shipping with firmware v0.5.6.

OK, no worries. Should I be able to flash the firmware if I use WSL?

I did buy the board through your shop, but it was quite a while ago.

Hey Solomon,

I have Ubuntu 26.04 running via WSL. I have pyusb and pyserial installed. Odrivetool opens just fine, but it can’t see my Odrive (which makes sense to me if the firmware has been erased) but when I try and run odrivetool dfu I get the error:

ModuleNotFoundError: No module named ‘usb’

Any idea what I can try next?

EDIT: Managed to downgrade to v0.5.4 in Ubuntu and odrivetool dfu launches, but is hung on “Waiting for ODrive” I have the dip switch on DFU and GPIO Pin 6 connected to GND.

EDIT: Managed to downgrade to v0.5.4 in Ubuntu and odrivetool dfu launches, but is hung on “Waiting for ODrive” I have the dip switch on DFU and GPIO Pin 6 connected to GND.

Have you made sure the DFU-mode device is passed through to WSL as well? It’s a different device/vendor ID than the main ODrive firmware. It should show up in device manager as “STM32 BOOTLOADER” or “STM Device in DFU Mode” or similar.

Hey Solomon, thanks so much for your help. I took the easy route and am working through a dedicated Linux machine now.