[libhid-discuss] How to use libhid-detach-device to detach kernel hid driver for a composite device

Xiaofan Chen xiaofanc at gmail.com
Fri Oct 24 23:47:23 UTC 2008


On Sat, Oct 25, 2008 at 3:13 AM, Charles Lepple <clepple at ghz.cc> wrote:
> On Oct 24, 2008, at 11:41 AM, Xiaofan Chen wrote:
>
>> Reference:
>> http://forum.microchip.com/tm.aspx?m=364987
>
> The signal-to-noise ratio of that thread is pretty low. What are we looking
> at?

Post 14, 19 and 20 in the thread.


>> I have a keyboard which posts as a USB composite device. To dump
>> the hid report descriptor under Linux, I need to detach the kernel hid
>> driver
>> in order to use "lsusb -vvv" to dump the HID report descriptor. Somehow
>> libhid-detach-device can only detach the first interface (interface 0).
>>
>> Is it possible to patch it to be able to detach other interfaces?
>> I am not a real programmer though...
>
> See
> http://libhid.alioth.debian.org/doc/hid__opening_8c.html#1ca48853ebe890459271bdb99b8aaac6
>
> The second parameter to hid_force_open() is the interface number.
>

So we can patch the file libhid-detach-device to have one more parameter
to do the job. Thanks for the hints.
http://libhid.alioth.debian.org/doc/libhid-detach-device_8c-source.html#l00011

Regards,
Xiaofan



More information about the libhid-discuss mailing list