[libhid-discuss] hid_force_open & non-root access using udev and also other platforms

Xiaofan Chen xiaofanc at gmail.com
Mon Oct 8 09:28:44 UTC 2007


On 10/8/07, Folkert van Heusden <folkert at vanheusden.com> wrote:
> > > - and on other platforms like *BSD, will hid_force_open work as well?
> >
> > No. Most likely you have to disable uhid and use ugen.
>
> What is uhid/ugen?

Normally under FreeBSD, uhid will claim the HID device and libusb
based application will not work. So you would disable uhid and enable
ugen. After recompiling the kernel, your libusb based application
will then work.

> Also: wasn't the goal of libhid to have an uniform interface? Then these
> exceptions are odd, aren't they?
>

Because libhid is now based on libusb which is not really suitable
for HID interface for Windows/FreeBSD/MacOS. The better option is
to have native HID API as the backend and not libusb. The development
version of libusb-win32 is trying to add HID as a backend. libusb
under FreeBSD is not as easy to deal with as libusb under Linux
and libusb-win32 under Windows as far as I know.

For example, it took me quite some time to get a libusb based application
to work with FreeBSD.
http://lists.freebsd.org/pipermail/freebsd-usb/2007-April/003177.html

By the way, I think the strong point of libhid is the HID parser. If you
do not need that functionality, you'd better use libusb under Linux
and use Native HID APIs under other OS.

Xiaofan
http://mcuee.blogspot.com



More information about the libhid-discuss mailing list