Timeouts on OSX
Justin Knotzke <jknotzke <at> shampoo.ca>
2011-11-06 17:05:30 GMT
Hi
I am having some issues with libusb and OSX 10.7.2.
I am having nearly the same issues using standard IOKit so I do not think this is a libusb issue. But maybe someone can help me.
I have a USB stick that does not use a driver of any sort. I am able to read and write off this stick without issue. The issue arises when I close down the device and the application and restart. libusb finds the device appears to open it and then throws a series of timeout errors. Here is how I am closing down the devices:
if (usb_device) {
rc = usb_release_interface(usb_device, readEndpoint);
rc = usb_release_interface(usb_device, writeEndpoint);
rc = usb_close(usb_device);
}
This returns without error..
Here is how the debug looks (I've taken out redundant messages to reduce the size of this email).
The last message seen when closing down the application:
usb_os_close: 05ac:8006
The re-start of the application:
Found a the USB stick !
usb_os_open: 0fcf:1008
usb_set_configuration: called for config 1
usb_claim_interface: called for interface 0
Interface 0 of device is 0x00007033
claim_interface: Interface 0 of device from QueryInterface is 0x1042263a0
libusb/darwin.c get_endpoints: building table of endpoints.
get_endpoints: Pipe 1: DIR: 1 number: 1
get_endpoints: Pipe 2: DIR: 0 number: 1
libusb/darwin.c get_endpoints: complete.
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 5 bytes of data on endpoint 0x01
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 64 bytes of data on endpoint 0x81
{snip....}
USB error: libusb/darwin.c usb_bulk_transfer: transaction timed out
USB error: usb_bulk_read: An error occured during read (see messages above)
usb_bulk_read Error reading:usb_bulk_read: An error occured during read (see messages above)libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 64 bytes of data on endpoint 0x81
USB error: libusb/darwin.c usb_bulk_transfer: transaction timed out
USB error: usb_bulk_read: An error occured during read (see messages above)
usb_bulk_read Error reading:usb_bulk_read: An error occured during read (see messages above)libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 64 bytes of data on endpoint 0x81
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 3 bytes of data on endpoint 0x01
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 64 bytes of data on endpoint 0x81
USB error: libusb/darwin.c usb_bulk_transfer: transaction timed out
USB error: usb_bulk_read: An error occured during read (see messages above)
usb_bulk_read Error reading:usb_bulk_read: An error occured during read (see messages above)USB error: libusb/darwin.c usb_bulk_transfer: transaction timed out
USB error: usb_bulk_read: An error occured during read (see messages above)
usb_bulk_read Error reading:usb_bulk_read: An error occured during read (see messages above)usb_os_close: 0fcf:1008
If I stop the application, remove the device and start over, all is OK. It's only after physically removing the device am I able to talk to it without issue.
Any ideas as to what is going on here ?
Thanks
J
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Libusb-devel mailing list
Libusb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-devel