[libhid-discuss] problems with libhid and Oregon Scientific weather station WMRS203 (interrupt read)

Jaeden Amero libhid at patater.com
Tue Jul 28 22:31:37 UTC 2009


On Tue, Jul 28, 2009 at 2:18 PM, Jordi
Puigsegur<jordi.puigsegur at gmail.com> wrote:
> Ok. But I get the same result:
>
>   TRACE: hid_interrupt_read(): retrieving interrupt report from device
> 004/003[0] ...
> WARNING: hid_interrupt_read(): failed to get interrupt read from device
> 004/003[0]: could not claim interface 0: Device or resource busy
> hid_interrupt_read 21

The device may still be claimed by the usbhid driver that
automatically claims HID devices on Ubuntu.

When I was doing some libusb work, I found that I needed to unbind the
interface from the driver before I could claim it with libusb. The
interface will remain unclaimed until the device is connected again. I
currently run the following commands to unbind the interface whenever
I need to use the device and libusb can't claim the interface.

# cd /sys/bus/usb/drivers/usbhid
# echo -n interface > unbind
"interface" is the name of the interface in the
/sys/bus/usb/drivers/usbhid folder. For my device, it was something
like "6-2:1.0". It will look similar for your device. From your lsusb
output, I'd guess that your interface would have the identifier
"4-2:1.0". The first part of that identifier varies based on which bus
and port number your device is plugged into and the second part varies
with the configuration number (usually always 1) and the interface
number.

There is probably a more permanent and sustainable solution to this
issue, e.g. a way to prevent usbhid from claiming your interface
automatically. I'm open to suggestions on how to do that if anyone
else has some ideas.

Cheers,
Jaeden



More information about the libhid-discuss mailing list