acemind / usb-serial-for-android

Automatically exported from code.google.com/p/usb-serial-for-android
GNU Lesser General Public License v3.0
0 stars 0 forks source link

CP2102 USB packet loss during read #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When reading larger amounts of data using cp2102, in my case flight records 
download from a GPS flight recorder with 19200 baud, there are often missing 
data segements. The missing segments are always 64 bytes large, which is the 
read endpoint's max packet size. So it seems that sometimes a USB packet is 
missing.

Tested with a Nexus 7 tablet.

Original issue reported on code.google.com by felix.ha...@gmail.com on 26 May 2013 at 1:06

GoogleCodeExporter commented 9 years ago
It seems nbot to happen when using UsbRequests API instead of bulkTransfer()s, 
see attached patch. But of course this is problematic because:
* UsbRequests have no timeout
* Bug http://b.android.com/28023 for Android < 4.2

Original comment by felix.ha...@gmail.com on 26 May 2013 at 3:46

Attachments:

GoogleCodeExporter commented 9 years ago
Not reproducible with Galaxy S3

Original comment by felix.ha...@gmail.com on 28 May 2013 at 12:13

GoogleCodeExporter commented 9 years ago
moved to github: https://github.com/mik3y/usb-serial-for-android/issues/29

Original comment by mike.wak...@gmail.com on 13 Sep 2013 at 4:38

GoogleCodeExporter commented 9 years ago
Yeah I can confirm the issue is not happening when using UsbRequest. I did two 
stress test of 12 hours long each and no data was lost during transaction. 
However the UsbConnection.bulktransfer fails if no delay is added between each 
synchronous poll.

Original comment by pablin.v...@gmail.com on 27 Aug 2014 at 11:14