ODrive and OS X

I was able to build and flash the firmware. The odrive rotated the motors on the startup sequence.
I can see the USB device in: as /dev/tty.usbmodem1411
When I built the firmware I selected #define USB_PROTOCOL_NATIVE_STREAM_BASED as per instruction.
When I try to run demo.py I get the following:

python3.6 demo.py
looking for ODrive…
Found ODrive via PyUSB
ConfigurationValue 1
InterfaceNumber 0,0
EndpointAddress 130
InterfaceNumber 1,1
EndpointAddress 1
EndpointAddress 129

EndpointAddress for writing 1

EndpointAddress for reading 129

Connecting to device on USB device bus 20 device 22
Traceback (most recent call last):

… (Thinks code is links and wont let me post.)
usb.core.USBError: [Errno 60] Operation timed out

Any ideas?



I got it to work!


Did a make clean
and make

Must do a make clean first.

Then a make flash.

And it works on OS X


What version of MacOS are you using? And what computer? I have not had any luck with this so far.

This is the output I get, with #define USB_PROTOCOL_NATIVE and the default settings in demo.py

looking for ODrive…
no device found
no device found
no device found

Python 3.6.4

MacOS High Sierra
Version 10.13.2 (17C88)

MacBook Pro (Retina, 15-inch, Late 2013)

If you do a:
ls /dev

Do you see the usb modem in there?

Yes I see it in /dev

I’m running 10.12 not 10.13, so that could make a difference I suppose. I think I’m running almost the exact same laptop though.

I’ve been cataloging the issue here: https://github.com/madcowswe/ODrive/issues/97

But since this works for you, I think its less likely that it is a driver issue. I think its more likely a difference with how pyusb and libusb are installed.

Line 11 in demo.py is exactly like this right?
my_drive = odrive.core.find_any(consider_usb=True, consider_serial=False, printer=print)

That is the line I have.

It stopped working for me. But my error was different. I got it to work again by:

sudo port uninstall libusb
sudo pip uninstall pyusb
sudo port install libusb
sudo pip install pyusb

I am using macports to select current python version:

sudo port select --set python python36


I have tried every combination of things related to this. Uninstalling and reinstalling. Trying with brew instead. Trying with macports. Trying a combination for different parts. Incredibly frustrating :stuck_out_tongue:

If I uninstall pyusb, I obviously get an error that there’s no package named usb. If I leave pyusb installed and uninstall libusb then I get an error from pyusb that there’s no backend. The weird part is that if I uninstall libusb with brew, but install it with macports, pyusb still can’t find it so I get the no backend error.