title: Access native serial port on Android
body: <p>I want to give android application/service access to native serial port (UART RS-232). When I say native, I mean a real UART not a USB to serial dongle. I can see them from the terminal (connected to one of the 4 native serial port). It shows that kernel already takes care of the low level stuff. </p>
  
  <pre><code># ls -l /dev 
  crw-rw-rw- system   system   204,  67 2010-01-01 07:00 s3c2410_serial3
  crw-rw-rw- system   system   204,  66 2010-01-01 07:00 s3c2410_serial2
  crw-rw-rw- system   radio    204,  65 2010-01-01 07:00 s3c2410_serial1
  crw-rw-rw- system   system   204,  64 2010-01-01 07:00 s3c2410_serial0 
  </code></pre>
  
  <p>I use Gingerbread. I have ported Android to my platform which has a S5PV210 processor on. I have full control of the kernel and the permissions. I already modified a lot of things (cellular, touchscreen, LCD panel size etc) including the init.rc file. </p>
  
  <p>How can I talk to those devices from an Android APK?  As you can see "s3c2410_serial1" is from user "radio" because the original system I took the Gingerbread source code from had a GPRS module on that serial port. It's easy to change in the init.rc. But that just prove we can access a native serial port on an Android system, at least. </p>
  
  <p>The applications or services will not need to control over the baud rate or any fancy stuff to the APK. I just want to send and receive characters. The kernel can set a default baudrate and I'm happy with that. I don't even need control over RTS/CTS.</p>
  
  <p>any hint is appreciated. </p>