Any advice for getting a serial port working over USB?
I’m experimenting with two different USB-Serial dongles, one based on the Prolific PL2303 chipset and the other based on the FTDI R232. I’ve only had luck getting the prolific chip to do anything at all, but it’s extremely intermittent.
(1)
I’ve written some test apps based on Prolific’s drivers with middling success. Most of the time, the USB-serial dongle isn’t detected at all. The only way to get Android to recognize the presence of a serial dongle is to connect a micro-USB cable, then disconnect it. This seems to force Android to re-enumerate the USB bus, and see the USB-serial dongle. This will work through the first run of a serial app. After I quit and relaunch, the dongle isn’t detected.
No luck at all with the FTDI chipset, even using their provided test app (link below)
(2)
A second problem I have, is that for some of the test apps I’ve written, Android fails to request USB permission despite having
<uses-feature android:name="android.hardware.usb.host"/>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
in the AndroidManifest.xml file.
Here are the various apps and libraries I’ve tried:
[works sometimes]
Prolific PL2303 Android USB Host API SDK (v1.0.0.13b)
http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=230&pcid=41
[doesn’t work]
FTDI UART Terminal Application
http://www.ftdichip.com/Android.htm
[doesn’t work - sometimes crashes]
usb-serial-for-android
[doesn’t work]
UsbSerial