vpelletier / python-libusb1

Python ctype-based wrapper around libusb1
GNU Lesser General Public License v2.1
168 stars 65 forks source link

Cant' get macos to list devices #28

Closed BrendanSimon closed 6 years ago

BrendanSimon commented 7 years ago

Hi, I'm using Python3.6 with libusb1 from PyPI and libusb1 installed via HomeBrew, but I can't get my USB devices listed.

It lists standard apple devices, but not my serial ports, etc. However lsusb does list the devices (it's a bash script that parses the outupt of Sytem Profiler or System Information app).

I've read about libusb inf files for Windows (not sure why they're needed). Is there something similar required for Mac?

Is there a mailing list for python-libusb1 or should I use the libsub mailing list?

Thanks, Brendan.

vpelletier commented 7 years ago

Hello,

According to the libusb FAQ item on OSX usage, it should not be a permissions issue (which was my first guess, as this is typically the first issue on linux), but could be that there is a kernel driver already managing the device. If it is the case, then indeed you need something somewhat similar (but simpler-looking) to the inf dance on Windows to get the OS to let libusb access the device.

There is also an item about HID devices, which encourages the use of HIDAPI (no idea about python a binding for it though). Although it is not clear what happens when using libusb without described setup, it seems likely the devices are not visible.

About support channel, you're at the right place to start for issues using python-libusb1. If we cannot find a python-wrapper-specific cause and the issue persists, the libusb mailing list would be the next place to report the issue indeed.

Regard, Vincent

BrendanSimon commented 7 years ago

I took a look at ioreg -l and noticed that VirtualHere had matched the device, even though the VirtualHere client and servers weren't running. I unloaded the driver for the server and the device now shows up.

I added a support ticket for VirtualHere to see if they can shed further light on this. I'm still not sure if it is a VH issue or a libusb issue (or both) to resolve.

Thanks, Brendan :)