[libhid-discuss] Cannot claim interface 0

Charles Lepple clepple at ghz.cc
Fri Sep 29 00:54:41 UTC 2006


On Sep 28, 2006, at 8:09 PM, Mark S. Townsley wrote:

> More info....
>
>
> Before I go into all the libhid stuff, I actually called libusb  
> stuff, specifically
> to usb_detach_kernel_driver_np().

If you are calling libusb functions directly, you should be able to  
follow the code in hid_interrupt_write.

> Since seeing the "could not detach from kernel errors", I comment  
> out the code,
> rmmod the hid driver, and now interrupt_write()/read() returns this  
> error:
>
>   No error hid_interrupt_write 1 failed with return code 21
>
>
> I have  hid_set_debug(10);
>
> What does return code 21 means?

Return codes are enumerated here:

http://www.ghz.cc/~clepple/libhid/doc/html/hid_8h.html#a64

Check the source for hid_interrupt_write:

http://www.ghz.cc/~clepple/libhid/doc/html/hid__exchange_8c- 
source.html#l00380

-- 
Charles Lepple
clepple at ghz.cc





More information about the libhid-discuss mailing list