[libhid-discuss] Multiple duplicate interfaces?

Xiaofan Chen xiaofanc at gmail.com
Mon Oct 4 02:28:01 UTC 2010


On Mon, Oct 4, 2010 at 3:09 AM, Peter Stuge <peter at stuge.se> wrote:
>> I haven't tried HIDAPI that Peter mentioned, but it sounds like it
>> might offer a more portable solution.
>
> Indeed. With libusb there is still the matter of kernel drivers. The
> Windows support in libusb-1.0 tries to fake it on top of the HID API
> but I don't really think that's a good approach.
>
> HIDAPI on the other hand is tailored specifically for HID, on Win
> Mac Linux, works *with* the kernel drivers instead of against them,
> is simpler (less generic) than libusb, and I think the best solution
> for byte level communication with HID class devices.
>

HIDAPI under Windows and Mac OS X are using the native
HID API. Theoretically it should work with USB HID device and
Bluethooth HID device.

Under Linux, the default is to use libusb-1.0 (USB only). But
it can also be used with hidraw kernel driver. The hidraw kernel
driver backend for HIDAPI is only for very recent kernel version
and the hidraw driver may still need some further work. The good
thing about it is that it works with Bluetooth HID device.

Combining the HIDAPI and the libhid HID parser may be
an interesting work. If the GPL license of the HID parser
is a problem for some users, then another more liberal
license of HID parser needs to be written.



-- 
Xiaofan



More information about the libhid-discuss mailing list