Using the serial port on the A13 running Android - Help needed

Started by apfernandes, January 14, 2013, 01:10:52 PM

Previous topic - Next topic

apfernandes

Hello,

Has anyone been able to use a serial port on the A13 Olinuxino running Android?

I was trying to use this library

http://slickdevlabs.com/slick-usb-2-serial-library/

which works on a Motorola Xoom and Galaxy SIII but cannot have the A13 board recognize
the Prolific USB-RS232 adapter.

Has anyone tried to use the serial port successfully? Thanks

bernard

So you want to have a serial port but without using the internal UART ports.

Which USB connector are you using?  Are you using the OTG port or one of the HOST ports?  Maybe that makes a difference?

murerten

Hi,

I used an ftdi ft4232h 4 channel usb serial port.

First I tried the beta android driver that ftdi provides. To use it I had to change device permission. How did I do that? I changed the ueventd.rc file. I changed this line:

/dev/bus/usb/*            0660   root       usb

to

/dev/bus/usb/*            0666   root       usb

But I observed that this driver was not reliable. After some time connection goes. So this time I decided to use the linux drivers. I compiled the kernel with ftdi_sio driver included. This makes you able to read write to the /dev/ttyUSB0..3 devices.

But ... Yes there is always a but :) How can you read write to these files from java ???

The answer is jni and android ndk. You can do it from eclipse after installing android ndk dev kit and eclipse plugins for that.

So the last method I used may be hard if you don't know c but if you achive that you can use any usb serial that linux supports.

apfernandes

Quote from: bernard on January 14, 2013, 03:23:58 PM
So you want to have a serial port but without using the internal UART ports.

Which USB connector are you using?  Are you using the OTG port or one of the HOST ports?  Maybe that makes a difference?

I would like to use the UART ports if possible but was not able to access them. I tried both a prolific and ftdi chips USB cables but had no luck.

Finally I had to use a IOIO UART as a serial port and it's working fine.