This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Started with Android and UART
#1
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?
[-] The following 1 user Likes Luk3's post:
  • vivekb
Reply
#2
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
Reply
#3
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.
Reply
#4
(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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)