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.
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)
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:
Prolific PL2303 Android USB Host API SDK (v188.8.131.52b)
FTDI UART Terminal Application
[doesn’t work - sometimes crashes]