>>> So this seems like a bug in libusbx that it doesn't seem to honor the
>>> synchronous API expectations in this case, as evidenced by the 
>>> concatenating of the
>>> buffers from multiple calls. Or am I missing something?
>>
>> Can you try using the libusb-win32 or libusbK driver instead of WinUSB?
>> Besides this being an issue with libusbx, there's a possibility this
>> could come from the WinUSB DLL or driver, so confirming that the same
>> issue occurs when using another of the 3 drivers we support on Windows
>> could give us some more insight.
>>
>> Zadig should allow you to replace the WinUSB driver with another one.
>>
>> Regards,
>>
>> /Pete
>
> I actually started with libusb-win32 before I knew about libusbx and it had 
> the
> same behavior, which is why I started looking for alternatives.
>
> ~QSE

Just to eliminate the variables, I tested libusbx on Win7 x64 with each of the 
three
driver options in Zadig while capruring the USB bus traffic with a hardware 
sniffer.
The results were the same each time:

I sent a 1KB bulk out transaction followed by a bulk in transaction and checked 
the
returned data for errors. The first one succeed and the second in packet 
indicated
an error.  After looking at the bus data, I saw a single 2KB transaction 
folowed by
two in transactions.  The two 1KB transactions were concatenated into a single 
1KB
transaction.  Because of this concatenation, the order of transactions on the 
bus
does not match the order sent in my test code.

I can't send a zero length transaction after the first out transaction because
libusb times out when I set the length (parameter 4) of lib_usb_bulk_transfer to
zero.

My attempts to use WinUSB directly have also failed because for some reason I 
haven't
been able to get WinUSB to find the bulk interface on my device, even though
libusbx can access the bulk endpoints while using WinUSB.

I'm using Zadg 2.0.1.160 and libusbx 1.0.15.

Any other suggestions?

~QSE                                      
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to