Hi,

I'm currently developing an app that needs USB Host implementation to
communicate with a device to request data and settings. I'm testing
with an Archos 80 G9 as platform, running Android 4.0.3 (latest
firmware).

I can read and write from/to the device using the bulktransfer method
on 2 endpoints: 1 for reading and 1 for writing. The device's USB is
implemented correct, since I have no issues communicating with it
using a python script.

Writing is never a problem. However when I'm reading there allways
comes a point where I can no longer read any data from the USB
devices: bulktransfer keeps returning -1.

I have tried different timeout values, adding delays, flushing the
endpoint by reading until it's returning -1, implementing a Reader to
use in combination with a BufferedReader, but nothing so far has
solved the issue.

The strange thing is that when I plug the device in the computer and
run the python script, the data that should have been read in Android,
is read without any issue, as it is still buffered by the USB device.
So it appears that the issue is on the Android side.

I hope someone can suggest some possible solutions, since I'm running
out of ideas.

The code can be found at http://code.google.com/p/oscdroid/
I'm sure it's pretty nasty and could be a lot better, but so far most
functionality is working properly. Connection code is mainly in the
ConnectionService class.

I'd appreciate any suggestions.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to