LibUSB fails to enumerate all devices

Hans Petter Selasky hselasky at c2i.net
Mon Oct 24 13:53:28 PDT 2005


On Monday 24 October 2005 21:51, Brian K. White wrote:
> ----- Original Message -----
> From: "Loren M. Lang" <lorenl at alzatex.com>
> To: <freebsd-usb at freebsd.org>
> Sent: Sunday, October 23, 2005 5:51 AM
> Subject: LibUSB fails to enumerate all devices
>
> I am developing a USB device which has two interfaces, one interface
> uses a standard HID protocol, the other is completely custom at the
> moment.  FreeBSD attaches appropriately to the HID interface and works
> correctly.  For the custom interface, I was going to write a device
> driver in userspace using libusb, but I can't seem to find it.  I wrote
> a program to enumerate all devices on all busses, but the only device I
> see is the one device I don't have any driver loaded for.  Does FreeBSD
> not allow a userspace to access an interface of a usb device when any of
> it's interfaces are grabbed by a kernel driver even though the interface
> I want is not grabbed?

No. ugen, which is the device libusb is searching for, is only created when no 
subdevices has been attached. It is not impossible to have a shadow "ugen" 
hanging on all USB devices, but it is a little complicated, because you get 
two applications that can set the configuration: ugen and the USB device 
driver. Whenever the configuration number is set, all ugen devices in /dev 
must be re-created, and one should detach existing, attached USB sub-devices.

--HPS


More information about the freebsd-usb mailing list