Reading and writing data via USB port on Android 3.1

I am trying to write an Android application to read and write data from an Android tablet to our built-in device. The tablet and built-in device are connected via a USB port to a serial converter. Is it possible to read data from an embedded device into our Android tablet? Any sample code I can take a look at?

+5
source share
2 answers

Since the serial converter is a USB device Android tablet should act as a USB host . This feature is available with Android 3.1. The API documentation is available on the Android Developer Page page and contains sample code.

, : , USB HID, USB- CDC- - . linux lsusb /.

CDC , , .. . USB.

IN OUT ( ), UsbDeviceConnection.bulkTransfer() OUT . , , .

0

All Articles