by
NicoD » Fri Dec 07, 2018 5:18 pm
Or can this be done with uart? I don't use Android, only Linux.
When debugging Linux I use uart.
Here the discription in the wiki. It's all in Chinese, but you can use google Chrome and translate it.
"6 RK3399 platform Android hardware resources program access
6.1 Serial Port
Currently, the serial port that can be directly used is UART4, and the device name is /dev/ttyS4. Other serial port resources have been assigned to other functions. As shown in the following table, you can also use USB to serial port to expand:
Serial device Serial port resource usage
UART0 Already occupied by Bluetooth
UART1 Has been occupied by Gigabit Ethernet
UART2 Has been used as a debug serial port
UART3 Has been occupied by Gigabit Ethernet
UART4 Idle, the device name is /dev/ttyS4 (Note: ROM after 20180618 is required)
6.1.1 Interface Description for Serial Port Reading and Writing
HardwareControler. openSerialPortEx //Open the serial device
HardwareControler. select // Poll the serial port for data to be writable or readable
. HardwareControler. read //Read the serial port data
HardwareControler. write //Write data to the serial port
HardwareControler. close //Close the device
For interface description please refer to: FriendlyThings APIs
"
Here
http://wiki.friendlyarm.com/wiki/index. ... hings_APIsAnd here
http://wiki.friendlyarm.com/wiki/index. ... for_RK3399You find more info on how to connect via uart.