Connecting in Windows Fails (New System)

I have a brand new O-Drive v3.6. I’m running Windows 7 and installed Python 3.8.6 as requested in getting started.

  • I wired a 24V power supply to the drive, connected the 50W resistor, encoder and motor power phases.
  • Installed the Odrivetool
  • Downloaded zadig-2.7 and set Interface 0 and Interface 2 to WinUSB (v6.1.7600.16385), Interface 0 failed, interface 2 succeeded.
  • Ran the Odrive tool and get the message Could not claim interface * on USB device

Any idea what I need to do?

Thanks

Update - rebooting the PC and I;m able to set both interface 0 and 2. Only interface 0 shows up under USB devices under Device Manager. Made no difference to the error message.

Attempted to run on a Raspberry Pi 4B/4Gb version.
Get the following message: Could Not Open USB Device -3

I must be missing something obvious.

Only set the native interface to WinUSB. The other interface (CDC) should be USB Serial.

On the RPi it should work, though. Try pip install --upgrade odrive and then odrivetool dfu

Wetmelon - thanks for the suggestions but no luck.

On the PC

  • Set Interface 0 to USB Serial (CDC)
  • Set Interface 2 to WinUSB

Device Manager - O Drive shows up under Ports as ODrive 3.6 CDC Interface (Interface 0) (COM56), I still do not see Interface 2

Odrivetool: Could not open USB device (Doesn’t show the smiley face this time)
Odrivetool dfu: same message

Tried several different USB ports.

Tried a second ODrive board (Also v3.6 and 56V)
zadig shows: (I did not change anything, just left it as stock)

  • Interface 0 = None
  • Interface 2 = WinUSB (v6 1.7600.16385)

Odrivetool: Could not connect

Testing on the RPi:

  • Same result as before (for both boards)
    Note: I only have version 3.7 of Python installed but to go to 3.8 I think I would need to compile the code for it as I can’t simply install it.

RPi Issue Solved (Sort of).

  • Looks like I had a mistake in the UDEV rules. Only issue now is that the motor won’t turn. I can set parameters but motor does not do anything. Doesn’t even try to move. It is the ODrive D5065 motor and I think I have all parameters set according to the documentation (recommended settings)

Can someone post all parameters that they set for the D5065 motor? They don’t need to be perfect just anything to make the motor move.

I am running a 24V power supply capable of 10A and the motor is just spinning in open air with the 8192 encoder.

1 Like

What errors do you get? (dump_errors(odrv0))

Wetmelon,

I have been working through these issues and finding other items. The last recommendation that I found is that my python command returns 2.7.16. So the clue is “to fix it you can change the very first line in dfu.py from #!/usr/bin/env python to #!/usr/bin/env python3.” I have no idea where to find the dfu.py file.

The dump_errors() results now stand as:
In [1]: dump_errors(odrv0)

NameError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/odrive/pyfibre/fibre/shell.py in ()
----> 1 dump_errors(odrv0)

NameError: name ‘odrv0’ is not defined

In [2]:

Previously I had an axis:Error(s) UNKNOWN ERROR: 0x00000010
so did a:
pip3 install --upgrade odrive
odrivetool dfu

This resulted in “found device but could not check serial number” error this led to the tip to change to python3 and that is what I am trying to do now.

If someone could tell me how to change the default “python” from 2 to 3 or where the “dfu.py” file can be found I would be most grateful.

Fond it here /usr/local/lib/python3.7/dist-packages/odrive/dfu.py
but changing python to python3 doesn’t seem to help. Running drivetool dfu results in:

ODrive control utility v0.5.4
Waiting for ODrive…
Traceback (most recent call last):
File “/usr/local/bin/odrivetool”, line 149, in
odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
File “/usr/local/lib/python3.7/dist-packages/odrive/dfu.py”, line 512, in launch_dfu
update_device(device, firmware, logger, cancellation_token)
File “/usr/local/lib/python3.7/dist-packages/odrive/dfu.py”, line 304, in update_device
serial_number = device.serial_number
File “/usr/local/lib/python3.7/dist-packages/usb/core.py”, line 864, in serial_number
self._serial_number = util.get_string(self, self.iSerialNumber)
File “/usr/local/lib/python3.7/dist-packages/usb/util.py”, line 313, in get_string
raise ValueError(“The device has no langid”
ValueError: The device has no langid (permission issue, no string descriptors supported or device error)

running just odrivetool results in:
In [1]: dump_errors(odrv0)
system: not found
axis0
axis: Error(s):
UNKNOWN ERROR: 0x00000010
motor: Error(s):
UNKNOWN ERROR: 0x00004000
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: Error(s):
UNKNOWN ERROR: 0x00000010
motor: Error(s):
UNKNOWN ERROR: 0x00004000
sensorless_estimator: no error
encoder: no error
controller: no error

Behind the scenes, odrivetool is a batch file that calls python. Check what you get when you do python --version.

Yeah, looks like odrivetool and the firmware aren’t aligned, so you’re missing the error codes.

1 Like