I'm experiencing some unexpected behavior using the function libusb_bulk_transfer on IN transaction. The version used is 1.0.14.10577 running on windows 7 x64. Sometimes when the functions returns with timeout I can see some data written in the buffer correctly but the transferred variable reports 0 bytes. On the next libusb_bulk_transfer call the data is not available anymore and therefore it get lost.

Looking at the API documentation I read:

"Also check|transferred|when dealing with a timeout error code. libusbx may have to split your transfer into a number of chunks to satisfy underlying O/S requirements, meaning that the timeout may expire after the first few chunks have completed. libusbx is careful not to lose any data that may have been transferred; do not assume that timeout conditions indicate a complete lack of I/O."

Checking with an HW sniffer I see the packet sent from the devices correctly.

The problem happens more often if the timeout is set to few ms (in my case I set 1ms to increase the error rate).


Is this a knows bug?


------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to