Professional Documents
Culture Documents
Using UART From A Linux Shell
Using UART From A Linux Shell
Using UART From A Linux Shell
Page: 1 of 3
Using UART from a Linux Shell
This guide explains how to use a serial port using linux shell. It shows how to set
and read serial port settings, and how to send and receive data on a serial port.
Steps
To follow this guide, a terminal/shell is needed on the TechNexion development
kit. The easiest way is to use the debug console facility, but can also be
achieved using ssh or adb .
To make a long story short, what in schematics or user guides is called "UART1"
is /dev/ttymxc0 in software, "UART2" is /dev/ttymxc1 , and so on.
Bash Copy
Bash Copy
Page: 2 of 3
Bash Copy
Bash Copy
$ stty -a -F /dev/ttymxc2
Bash Copy
Bash Copy
$ cat /dev/ttymxc2
Please note that the receiving terminal can have buffering enabled, so the data
read might not be displayed immediately. The buffer is flushed once enough data
is entered, or when enough newlines are encountered.
Powered by Document360
Page: 3 of 3