ODrive 3.5 Not recognized by Windows


#1

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?


#2

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.


#3

Thanks, I’ll give it a shot tomorrow.


#4

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 [1]:

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”


#5

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

#6

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.


#7

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 [1]: 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?


Fail to flash Odrive
#8

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.


#9

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.


#10

2 posts were merged into an existing topic: Cannot flash firmware