[libhid-discuss] Re: Trying to use libHID to access extra keys on USB keyboard

Charles Lepple clepple at ghz.cc
Thu Jul 13 17:02:39 UTC 2006


Michel Lespinasse said:
> I installed libhid from the Debian package (version 0.2.15+20060325-2)
> and modified test_libhid.c to try to access the extra keys. In the
> HIDInterfaceMatcher structure I set the vendor/product ID as needed and
> in the hid_force_open call I figured out I needed to set the second
> parameter to 1 since that is the interface number I care about.
> I have attached the produced output too...

Looks good so far...

> Should hid_get_input_report be the correct function to call to access the
> extra keys in the first place ???

It should be. I am not sure why the USB bus reset - the worst that should
happen is that one endpoint gets stalled, but the rest of the device (as
well as all other devices) should not be affected.

The other thing to try is to set the idle rate to something non-zero and
use the interrupt read functions.

Also, when you first plug in the keyboard (before running any libhid
code), what does /proc/bus/usb/devices say about the endpoints?

-- 
Charles Lepple
clepple at ghz.cc




More information about the libhid-discuss mailing list