|
From: Alan S. <st...@ro...> - 2009-10-11 16:32:30
|
On Sun, 11 Oct 2009, Kustaa Nyholm wrote: > Hi, > > pleaded about my problems previously and get some suggestions but > nothing helps. > > When I run my code to access my weather station that advertises itself > as HID device I run into the following issue: > > I do the normal libusb (0.1) stuff of usb_init()/usb_find_buses()/usb_find_devices() > and all this works every time, I can find my device no problem. > > I can also set the configuration with usb_set_configuration() but > when I try to usb_claim_interface() I get "device busy" > and indeed dmesg I see that the interface has been claimed > by usbhid. > > So I unbind it with usb_detach_kernel_driver_np() after > which an attempt to claim interface returns "no such file or directory". > > But I can still enumerate the buses and devices and find my > device! What is going on? Can't tell from your verbal description. What's in the dmesg log? > So obviously usbhid is claiming my device in the first place > and I can force it to detatch itself but then libusb cannot > claim it? How can the libusb find the device in the > enumration phase but not find it when I try to claim the > interface? Perhaps if you post the source code, the problem might be apparent. Alan Stern |