pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libusb problem ?



On 18 Oct 2008 "Sébastien BOCAHU - zecrazytux" wrote:
> I'm testing libusb. I've written a simple code (see below) which aims to
> list all devices (product id and vendor id, nothing more)
>
> It works on GNU/Linux, but on my NetBSD -current (.73) box with libusb
> from pkgsrc, it displays *one* device *only*.
>
> Where does the problem come ?

The problem comes from userland USB access not being the same on NetBSD as
on Linux :)

usb_find_devices() does not really find all devices, the BSD version only
looks at ones matching "ugen*" as I think it is only possible to fetch the
actual descriptor information via an ioctl on the /dev/ugenN.00 file, and
a typical installation will only have the ugen0.EE files made by default.

I came to this because I could not extract pictures from my camera with
gphoto2. It turns out that because I have a fingerprint reader built into
the laptop, ugen0 refers to that and libusb found no way to access ugen1..

I don't know how best to fix that, in my case MAKEDEV ugen1 was enough to
give me access to the camera but in general it doesn'l look like there is
a way for us to exactly match the libusb-0.1 API anyway though much of the
descriptor information is available. I see that there are two forks of the
later version of this library that was never released:

  openusb.sourceforge.net has support for Linux and Solaris only so far

  libusb.sourceforge.net released libusb-1.0 in December and claims
  backwards compatibility with libusb-0.1 and NetBSD support.

regards,
iain


Home | Main Index | Thread Index | Old Index