Serial hangs in Android

wdyn1
I have written an app for Mini210S running Android 2.3.1 (from
FriendlyARM-210-DVD-20130801-B) using libfriendlyarm-hardware.so and
HardwareControler API.  I open the serial port and call
HardwareControler.select followed by HardwareControler.read at regular
intervals (1/sec for now but want 10/sec) using scheduleAtFixedRate and
display the result.  This works perfectly except I only get about 50-150
read iterations before the serial port/thread hangs and I need to restart
the app.

Other than rebuilding the kernel to be able to use android-serial-api are
there any recommendations?  Is there a way to reset the serial port without
resetting my app?

Anousha khan
Hello,  i want to have gps data in my 210 android kit, the gps worked well
with android 4.0.3 in the con port 2 , but when i installed android 2.3.1
in it i receive no gps data,where the problem lies? in android kernel? my
app is such that i have to work with android 2.3.1 with the gps data.

wdyn1 can you please guide me about it. Thanks

Dave McLaughlin
@wdyn1. I gave up on the friendlyarm driver. It is too limited and being
closed source means you can't fix it when it breaks, as you have
discovered.

You don't need to rebuild the kernel to use the android-serial-api. You
just need to add some changes to the init.rc to make the ports available in
user space.

Then all you need to do is add the lib to your app and use it. 

If you download and install the NDK, you can modify the code for your own
use otherwise, just use it as it is.