|
From: Xiaofan C. <xia...@gm...> - 2007-10-25 00:07:06
|
On 10/23/07, Brad Schick <sc...@gm...> wrote: > 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. > > 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. > What does "lsusb -v" say? And try to disable auto-suspend by recompiling the kernel. You may have a firmware bug which does not handle suspend-resume properly. This may or may not be your problem. From 2.6.23 onwards, auto-suspend will be not be enabled by default because so many USB device are buggy dealing with suspend/resume. Reference: My Problem: http://forum.microchip.com/tm.aspx?m=283378 http://sourceforge.net/mailarchive/forum.php?thread_name=1189786321l.13173l.12l%40mofo&forum_name=libusb-devel Solution from Linux USB developers: http://forum.microchip.com/tm.aspx?m=275422&mpage=2 http://sourceforge.net/mailarchive/forum.php?thread_name=1189786321l.13173l.12l%40mofo&forum_name=libusb-devel Xiaofan http://mcuee.blogspot.com |