Losing O-Drive Connection

Hi,

I have a setup where I am controlling the O-Drive across USB through the Python interface and I keep running into an error. Every once in a while, the O-Drive will stop responding and I can usually tell because my Python program will hang indefinitely. If the liveplotter is running, it will stop reading values.

I noticed that the O-Drive motor continues to hold position and if I set a velocity or current, it will continue to hold the velocity or current setpoint. I checked the windows device manager as well and continues to display the O-Drive on it’s device list. When tried troubleshooting with “odrivetool --verbose” and I did get the following error:

USB device init failed. Ignoring this device. More info: Traceback (most recent call last):
File “C:\Users\InterlogTech\Anaconda3\lib\site-packages\fibre\usbbulk_transport.py”, line 196, in discover_channels
bulk_device.init()
File “C:\Users\InterlogTech\Anaconda3\lib\site-packages\fibre\usbbulk_transport.py”, line 55, in init
self.cfg = self.dev.get_active_configuration()
File “C:\Users\InterlogTech\Anaconda3\lib\site-packages\usb\core.py”, line 875, in get_active_configuration
return self._ctx.get_active_configuration(self)
File “C:\Users\InterlogTech\Anaconda3\lib\site-packages\usb\core.py”, line 102, in wrapper
return f(self, *args, **kwargs)
File “C:\Users\InterlogTech\Anaconda3\lib\site-packages\usb\core.py”, line 239, in get_active_configuration
bConfigurationValue=self.backend.get_configuration(self.handle)
File “C:\Users\InterlogTech\Anaconda3\lib\site-packages\usb\backend\libusb0.py”, line 510, in get_configuration
100)
File “C:\Users\InterlogTech\Anaconda3\lib\site-packages\usb\backend\libusb0.py”, line 593, in ctrl_transfer
timeout
File “C:\Users\InterlogTech\Anaconda3\lib\site-packages\usb\backend\libusb0.py”, line 431, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b’libusb0-dll:err [control_msg] sending control message failed, win error: A device atta
ched to the system is not functioning.\r\n\n’

When this happens my program will not respond to Ctrl-C but if I shut off the O-Drive or disconnect the USB cable, Python will throw a Channel Broken Exception and start responding again. I am usually able to resolve the issue by disconnecting and reconnecting the USB cable or power cycling the O-Drive. I have tried rerouting the USB cables further away from the power supply but that does not seem to have had any impact on the frequency of this issue.

Has anyone else run into this issue and how did you resolve it? I’d appreciate any help. This is driving me crazy and really limits the utility of having an O-Drive in my system.

1 Like

welcome ap3124

i had a similar yet different USB issue.

the thing could run for hours/days without reproducing but would reproduce eventually.

I ended up getting rid of USB interface and PC, in favor of a Arduino/UART control scheme. I may likely to explore CAN as well.

I should be able to report if that works for me or not in the next few weeks

sorry :confused:

We seem to be having very similar issues. I think mine might be at least partially related to EMI. My setup has a lot of peripheral equipment (laptop, power supplies, some high frequency/high voltage equipment) very close by. I don’t think I could run it for a couple hours without the issue happening at least a few times and it seems to happen even when I have the other devices turned off.

I’ll have to look into Arduino/UART to see if that’s appropriate for me as well

1 Like

I also had that issue a few weeks ago. But then whilst driving three ODrives from the same computer. It wasn’t very frequently and now I didn’t have it in a long time .

I don’t know what the problem was, let alone what I did to ‘fix’ it.

I used Ubuntu 16.04 on the computer