Tinker Board Forum

Full Version: Getting Started with Android and UART
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am getting started with Android 7 on Tinker Board S. In my application I have external device which uses UART to communicate. I know that UART3 (ttyS3) is used for kernel debug. Where can I find information which peripherals are free to use? How to change ttyS configuration? How use ttyS from code? Just stream writer/reader? Do I need to root device?
Hello all

I too am not able to use UART. If you were able to use UART on Android, could you please help me out how to get it up and running?

Many thanks
Hi,

I have used USB <-> UART converter (FTDI) and library provided by FTDI. If it is not acceptable solution for you, first try to use ttyS like in regular Linux by adb shell and echo to write and cat to receive. Permission to ttyS has root. Remember that permissions will be restored to default after reboot. Maybe using JNI is solution?

From Android point of view I think you should open ttyS device as file to read/write. I have no idea how to set uart parameters.
(04-24-2019, 07:17 AM)Luk3 Wrote: [ -> ]Hi,

I have used USB <-> UART converter (FTDI) and library provided by FTDI. If it is not acceptable solution for you, first try to use ttyS like in regular Linux by adb shell and echo to write and cat to receive. Permission to ttyS has root. Remember that permissions will be restored to default after reboot. Maybe using JNI is solution?

From Android point of view I think you should open ttyS device as file to read/write. I have no idea how to set uart parameters.

Using the USB-UART converter is not possible for me. I am making an app using unity and will add wiringpi code to it.