SOLVED: Issue connecting Odrive to RPi over USB

I’m trying to connect to a 24V Odrive V3.6 using a Raspberry Pi 3 B+ running Raspbian GNU/Linux 9 (stretch) over USB using odrivetool. I’ve followed all of the instructions for Linux on the getting started page (including adding odrive to the path), and I’ve also been able to successfully connect to the same odrive over USB from a Windows computer.

When I run odrivetool, I get the following warning messages and then the tool just never connects to the odrive no matter how long I wait:

~/ $ odrivetool
ODrive control utility v0.4.9
/home/pi/.local/lib/python3.5/site-packages/fibre/ RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
  console.runcode('import sys')
/home/pi/.local/lib/python3.5/site-packages/fibre/ RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
  console.runcode('superexcepthook = sys.excepthook')
/home/pi/.local/lib/python3.5/site-packages/fibre/ RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
  console.runcode('def newexcepthook(ex_class,ex,trace):\n'
/home/pi/.local/lib/python3.5/site-packages/fibre/ RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
Please connect your ODrive.
You can also type help() or quit().

Does anyone have any suggestions or know how to fix this issue? Thanks!

as for the warnings, can you try /home/pi/.local/lib/python3.5 -m pip install ipython?
when you use lsusb command is ODrive in the list?

1 Like

I’ve installed ipython and restarted but am still getting the same warnings.

lsusb returns the following:

Bus 001 Device 006: ID 1209:0d32 InterBiometrics
Bus 001 Device 004: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I suspect that the reason it’s having trouble connecting may be due to the fact that the Pi has two pairs of stacked USB hubs rather than single USBs. I tried running sudo udevadm monitor -u and then unplugging and replugging the odrive in an effort to figure out which USB port I’m using, but I’m not quite sure what to do with this information for running odrivetool.

UDEV  [1048.344289] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/tty/ttyACM0 (tty)
UDEV  [1048.346674] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.1 (usb)
UDEV  [1048.353401] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.2 (usb)
UDEV  [1048.353754] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0 (usb)
UDEV  [1048.357924] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2 (usb)
UDEV  [1055.982990] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2 (usb)
UDEV  [1055.994979] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0 (usb)
UDEV  [1055.997751] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.1 (usb)
UDEV  [1055.998321] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.2 (usb)
UDEV  [1056.007402] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/tty/ttyACM0 (tty)

I also ran odrivetool in verbose mode and confirmed that it is indeed getting stuck in the USB discover loop.

I tried running odrive tool using --verbose instead of just -v and noticed that it was saying that USB access was denied. As a result, I ran sudo odrivetool instead and it successfully connected! I’ll need to figure out how to set up my udev rules correctly so that it’ll work without sudo-ing, but otherwise it’s all working now. Thanks for the help!

I also faced the same problem.
My environment is Ubuntu 18.04.

The same error occurs when executing sudo odrivetool.

I have the same problem as you. But I failed when I ran sudo odrivetool.
Any advice?

Are you receiving the same warnings, or the “USB” device access denied" error, or just not ever connecting? Any more info you have would be really helpful for diagnosing the issue.

Hmm, that’s really odd. It looks like it’s not even finding the odrivetool command at all when you’re using sudo. Did you try adding odrivetool to your path? (, Linux instruction #3)

you shouldn’t need sudo to access an usb device if you have the rules set up properly. check that there is “xx-odrive.rules” in /etc/udev/rules.d with vendor id, product id and MODE="0666".

1 Like

I reinstalled Odrive. Now it works using sudo. But I didn’t manually add odrivetool to my path.

I got it.

idVendor is 1209 and idProduct is 0d32.
So, I rewrite my udev rules.
sudo gedit /etc/udev/rules.d/xxx.rules #“xxx.rules” is your rules file
Enter in the file:
SUBSYSTEMS==“usb”, ATTRS{idVendor}==“1209”, ATTRS{idProduct}==“0d32”, GROUP=“pi”, MODE=“0666”
#‘pi’ is my username
sudo reboot
sudo udevadm control --reload
Then, you can access the usb device without sudo.

In my case there was a warning but I could connect to Odrive.

I need to wait 2 ~ 3 [s] for successful connection.

Hi all,

I ran into the same issue but on Windows (with the RuntimeWarning). My computer does connect to the odrive after the warnings, but then loses the connection almost immediately (‘oh no odrive disappeared’). I’m not sure if the two issues are related. Is this likely a USB problem? I tried connecting it to different ports on my computer but had the same problem. I’ll try using a different cable, but besides that I’m at a loss.

Maybe reinstall odrivetool will help.

Just an FYI for anyone finding this… Something is injecting smart-quotes in the udev rule file line above, so you’ll need to replace them with regular quotes for udev to work. grr.

1 Like

Hi, did anyone solve this problem for windows? Any help much appreciated!