Monday, August 1, 2011

[android-developers] USB Host Mode: Multiple Interfaces, not possible to receive data at the same time?

I've written an app to connect an USB Device that have 4 Interfaces
with 4 connected Endpoints:

UsbDeviceConnection usbConnection1 = usbManager.openDevice(device);
UsbInterface usbInterface1 = device.getInterface(i);
usbConnection.claimInterface(usbInterface1, true))

UsbDeviceConnection usbConnection2 = usbManager.openDevice(device);
UsbInterface usbInterface2 = device.getInterface(i);
usbConnection.claimInterface(usbInterface2, true))

.
.
.


But if I start the 4 seperate receivers at the same time (each are 4
runnables):

@Override
public void run() {
try {
while (connectionRunning) {

buffer.clear();
receive = usbConnection.bulkTransfer(usbEndpointIN, buffer.array(),
buffer.array().length, 100);


...then the datas has a delay and didn't get all of the data. If I run
only one receiver all is ok.

Have anyone a solution for this problem?

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate