Communicating with serial USB device over Android

71,702

Solution 1

I can really recommend the USB-Serial-For-Android library, it supports multiple popular usb-to-serial chips (also FTDI) and there is no rooting required. Check out the GitHub project here.

Solution 2

There is a project dedicated to serial communication on Android. android-serialport-api. I think, it is a good resource to start with.

FTDI also provides Android related resources.

Solution 3

I think there's currently only one properly maintained library for serial USB communication and it's felHR85/UsbSerial. It supports several USB chips including FTDI (see Devices Supported).

Unfortunately mik3y/usb-serial-for-android seems to be dead.

And no, you don't need to root your device for connecting to and communicating with a USB device.

EDIT: We have a maintained fork of mik3y's library. See kai-morich/usb-serial-for-android

EDIT2: It seems that all of these libraries are maintained again, mik3y joined forces with kai-morich and they are working together.

Share:
71,702
Josef
Author by

Josef

Updated on November 01, 2020

Comments

  • Josef
    Josef over 3 years

    I have one custom made device for measuring current. This device can be connected to PC and communication is done over USB. It is based on FTDI chip. I have application written in Java and that application is using rxtxSerial.dll library and gnu.io.rxtx_2.1.7.4.jar. Now I want to port this application on my android device and I'm litte bit confused what to do that? All I have is android tablet (os version 4.1.1), OTG cable and this measuring device.

    Should my device be rooted? Is there any kind of library that I can simply add to my Java Android application and read data over USB? Where to start?

    I have tried to port existing application for PC using same library, but rxtxSerial.dll is missing and I can't transfer it to my android device.