Brad Schick
2007-10-23 23:47:21 UTC
I have a usbhid device that I am using libusb (actually pyusb) to
communicate with. The first problem I had was the device always being
busy when claiming an interface. I solved that by unbinding the kernel
usbhid driver with:
echo -n "2-1:1.0" > /sys/bus/usb/drivers/usbhid/unbind
That at least lets me open the device and claim the interface from my
application. But when I try to do an interrupt_write to an endpoint I
get the following error.
usb.USBError: error submitting URB: No such file or directory
Another strange thing is that if I try to rebind the usbhid driver with:
echo -n "2-1:1.0" > /sys/bus/usb/drivers/usbhid/unbind
I get the following error:
bash: echo: write error: No such device
But I can see that the device is still listed under
/sys/bus/usb/devices, and it is not bound to a driver.
|-- bAlternateSetting
|-- bInterfaceClass
|-- bInterfaceNumber
|-- bInterfaceProtocol
|-- bInterfaceSubClass
|-- bNumEndpoints
|-- bus -> ../../../../../../bus/usb
|-- ep_04 -> ../../../../../../class/usb_endpoint/usbdev2.3_ep04
|-- ep_83 -> ../../../../../../class/usb_endpoint/usbdev2.3_ep83
|-- modalias
|-- power
| |-- state
| `-- wakeup
|-- subsystem -> ../../../../../../bus/usb
|-- uevent
|-- usb_endpoint:usbdev2.3_ep04 ->
../../../../../../class/usb_endpoint/usbdev2.3_ep04
`-- usb_endpoint:usbdev2.3_ep83 ->
../../../../../../class/usb_endpoint/usbdev2.3_ep83
Any suggestions? I'm fairly new to usb development, so I'm not sure
where to get more info. I haven't found any logs with info or much by
searching the net. I am running Ubuntu 7.10 32bit, kernel
2.6.22-14-generic, libusb 0.1.12-7, python-pyusb 0.3.5-4.
Thanks,
-Brad
communicate with. The first problem I had was the device always being
busy when claiming an interface. I solved that by unbinding the kernel
usbhid driver with:
echo -n "2-1:1.0" > /sys/bus/usb/drivers/usbhid/unbind
That at least lets me open the device and claim the interface from my
application. But when I try to do an interrupt_write to an endpoint I
get the following error.
usb.USBError: error submitting URB: No such file or directory
Another strange thing is that if I try to rebind the usbhid driver with:
echo -n "2-1:1.0" > /sys/bus/usb/drivers/usbhid/unbind
I get the following error:
bash: echo: write error: No such device
But I can see that the device is still listed under
/sys/bus/usb/devices, and it is not bound to a driver.
tree 2-1\:1.0
2-1:1.0|-- bAlternateSetting
|-- bInterfaceClass
|-- bInterfaceNumber
|-- bInterfaceProtocol
|-- bInterfaceSubClass
|-- bNumEndpoints
|-- bus -> ../../../../../../bus/usb
|-- ep_04 -> ../../../../../../class/usb_endpoint/usbdev2.3_ep04
|-- ep_83 -> ../../../../../../class/usb_endpoint/usbdev2.3_ep83
|-- modalias
|-- power
| |-- state
| `-- wakeup
|-- subsystem -> ../../../../../../bus/usb
|-- uevent
|-- usb_endpoint:usbdev2.3_ep04 ->
../../../../../../class/usb_endpoint/usbdev2.3_ep04
`-- usb_endpoint:usbdev2.3_ep83 ->
../../../../../../class/usb_endpoint/usbdev2.3_ep83
Any suggestions? I'm fairly new to usb development, so I'm not sure
where to get more info. I haven't found any logs with info or much by
searching the net. I am running Ubuntu 7.10 32bit, kernel
2.6.22-14-generic, libusb 0.1.12-7, python-pyusb 0.3.5-4.
Thanks,
-Brad