From: Michael W. <mic...@gm...> - 2008-12-12 21:00:29
|
On 12/11/08, Daniel Drake <ds...@ge...> wrote: > Michael Williamson wrote: >> I notice that, if I do this: >> >> linux-oayh:/home/t9/src/labjack # ls -l /dev/bus/usb/003 >> total 0 >> crw-r--r-- 1 root root 189, 256 Nov 11 20:34 001 >> crw-r--r-- 1 root root 189, 257 Nov 11 20:34 002 >> linux-oayh:/home/t9/src/labjack # >> >> These two device files behave differently. If I try >> >> # cat /dev/bus/usb/003/001 >> >> I get short garbage output, as expected. But look, >> >> # cat /dev/bus/usb/003/002 >> cat: /dev/bus/usb/003/002: No such file or directory >> >> So, I guess it's not a problem with libusb-1.0. > > Strange, sounds like a possible udev problem. libusb could be more > resilient against this kind of thing though, so I'll add it to the list > of future improvements. Well, I deleted that file, that was causing the problem. But now I get an error -6 (in use?) in my program when attempting to claim interface 0. Do I need to 'rmmod' some USB module perhaps? I should also add that the 'openusb' library succeeds at claiming interface 0, but crashes later. ... libusb:debug [libusb_get_configuration] libusb:debug [libusb_get_configuration] falling back to control message libusb:debug [libusb_get_next_timeout] next timeout in 0.999886s libusb:debug [handle_events] poll() 1 fds with timeout in 1000ms libusb:debug [handle_events] poll() returned 1 libusb:debug [reap_for_handle] urb type=2 status=0 transferred=1 libusb:debug [handle_control_completion] handling completion status 0 libusb:debug [ctrl_transfer_cb] actual_length=1 libusb:debug [libusb_get_configuration] active config 1 got configuration libusb:debug [libusb_claim_interface] interface 0 usb_claim_interface error -6 libusb:debug [libusb_close] libusb:debug [usbi_remove_pollfd] remove fd 3 libusb:debug [libusb_unref_device] destroy device 3.37 libusb:debug [libusb_exit] libusb:debug [libusb_exit] freeing default context l -Mike |