>
> UsbDeviceConnection usbConnection = usbManager.openDevice(device); 
>
>
> UsbInterface usbInterface = device.getInterface(0);
>
>
> UsbEndpoint usbEndpointIN = null;
>
> UsbEndpoint usbEndpointOUT = null;
>
>
> for (int e = 0; e < usbInterface.getEndpointCount(); e++) {
>
>
> UsbEndpoint ep = usbInterface.getEndpoint(e);
>
>
> if (ep.getType() == UsbConstants.USB_ENDPOINT_XFER_INT) {
>
> if (ep.getDirection() == UsbConstants.USB_DIR_IN) usbEndpointIN = ep;
>
> else usbEndpointOUT = ep;
>
> }
>
> }
>
>  int receive = -1;
>
> temp = ByteBuffer.allocate(16);
>
> while(true) {
>
>
> int send = usbConnection.bulkTransfer(usbEndpointOUT, buf, buf.length, 
> 1000);
>
>
> Log.i("Test","" + send);
>
>  receive = usbConnection.bulkTransfer(usbEndpointIN, buffer.array(), 
> buffer.array().length, 1000);  
>
>
> Log.i("Test","" + receive);
>
>
> }
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to