Ticket #23 (closed defect: fixed)
Opened 3 years ago
Last modified 3 years ago
libusb_get_device_list OS X
| Reported by: | auser01 | Owned by: | hjelmn |
|---|---|---|---|
| Milestone: | Component: | libusb-1.0 | |
| Keywords: | get_device_list | Cc: | |
| Blocked By: | Blocks: |
Description
libusb_get_device_list does not return devices if they have a non-consecutive address.
This can happen, for example, with a virtual machine (such as Parallels) that has a USB device assigned to Windows. This will create a gap in the addresses and anything after that gap is not returned in libusb_get_device_list.
When OS X finds a USB device it assigns it an address. If a virtua machine "takes" the device it looks like OS X has a hole in the assigned addresses. For example, OS X initally creates a list such as:
ADDR Device
1 Fun 1
2 Fun 2
3 Fun 3
4 Fun 4
If a VM does not use any of the devices libusb_get_device_list is just happy.
But if a VM "takes" Fun 3 then libusb_get_device_list will only report Fun 1 & Fun 2. Fun 4 gets lost.
Change History
comment:1 Changed 3 years ago by auser01
comment:2 Changed 3 years ago by auser01
The built-in OS X utility "USB Prober" can see all of the devices and this might be a helpful tool.
Also, the function libusb_open_device_with_vid_pid() doesn't work if there is a gap in the address #s of USB devices. Probably same issue. libusb_open_device_with_vid_pid works correctly if there are no gaps in the address #s.
comment:3 Changed 3 years ago by hjelmn
- Owner set to hjelmn
- Status changed from new to assigned
I see the problem. I will post a patch to the mailing list once I have finished testing it.
comment:4 Changed 3 years ago by hjelmn
- Resolution set to fixed
- Status changed from assigned to closed
Patch submitted 03/18/2010
Forget to mention: Version 1.0.6 of libusb. OS X Leopard (10.5.8) and Parallels 5 (5.0.9308)