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/shell.py:104: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
console.runcode('import sys')
/home/pi/.local/lib/python3.5/site-packages/fibre/shell.py:105: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
console.runcode('superexcepthook = sys.excepthook')
/home/pi/.local/lib/python3.5/site-packages/fibre/shell.py:106: 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/shell.py:109: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
console.runcode('sys.excepthook=newexcepthook')
Please connect your ODrive.
You can also type help() or quit().
Does anyone have any suggestions or know how to fix this issue? Thanks!
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.
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!
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.
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".
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.
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.
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.
Hello,
I am having the same issues with connecting odrive to my computer. I’ve updated Interface 2 driver to libusb-win32 using Zadig. I’ve tried using different USB cables. My odrive is also powered from 24v source.
I have python3.6 and odrive is installed ( I know this because in the python shell, if I type import odrive, it doesn’t throw off an error, and also when I try to install odrive, I’m told that the requirement is already satisfied)
I am able to run odrivetool in my Windows Command Prompt (running in Administrator mode), but my odrive is not being detected. It throws off a bunch of errors similar to the ones OP got.
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts>odrivetool
ODrive control utility v0.4.11
c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\fibre\shell.py:104: RuntimeWarning: coroutine ‘InteractiveShell.run_code’ was never awaited
console.runcode(‘import sys’)
c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\fibre\shell.py:105: RuntimeWarning: coroutine ‘InteractiveShell.run_code’ was never awaited
console.runcode(‘superexcepthook = sys.excepthook’)
c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\fibre\shell.py:106: RuntimeWarning: coroutine ‘InteractiveShell.run_code’ was never awaited
console.runcode(‘def newexcepthook(ex_class,ex,trace):\n’
c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\fibre\shell.py:109: RuntimeWarning: coroutine ‘InteractiveShell.run_code’ was never awaited
console.runcode(‘sys.excepthook=newexcepthook’)
Please connect your ODrive.
You can also type help() or quit().
What worked for me was calling odrv0.vbus_voltage every five seconds after running sudo odrivetool and between the 3rd and 10th call, the ODrive will connect.