Good day to all!
Once I thought about developing an application that would require communication with a hardware device through a COM port. Although Android carefully provides api for working with usb devices, it unfortunately did not suit me, because I wanted to support my old tablet based on Android version 2.2. Standard api from Google, did not fit
for two reasons:
- First of all, it did not work for me.
- I still have an old device
So, after a long search on the Internet, I came across a very interesting solution
android-serialport-api . This solution is a Java wrapper in which through the JNI in which calls to the USB device are made.
')
Library developers offer 4 different ways to connect an Android device to a COM port via USB.

Since I had at my disposal a tablet with a USB host port, and I have a USB to RS232 converter on hand, I went with option number 2.
The advantages and disadvantages of such a solution are
Benefits- USB - RS232 converter can be easily found in the nearest radio market
- no perversions with my dear my heart tablet
- possible high speed information transfer
disadvantages- USB host connector required
- It is possible that the device will have to ruin
So let's get started!
Here I will describe the approach to the use of this library.
serialPortFinder.getAllDevices();
For serialPortFinder to work correctly, it is necessary that the USB-RS232 adapter be connected, defined in / dev.
This is the simple way to communicate with a
very large amount of iron through the COM port,