OES Prime has 5 available UART ports:
|Port||Device||TX Pin||RX Pin|
In this example, we are going to perform a loopback test by sending
data to a TX pin and receiving on the RX pin of the UART2 port.
Firstly, short the UART2 pins PA0 and PA1 as shown in the picture:
Then enable it by applying UART2 Device Tree overlay.
Open /boot/Env.txt and edit it so as it should look like this:
Reboot and log in to your device. Now we need to change terminal
line settings to disable echoing back every character typed,
otherwise, you will get endless data loop from “`/dev/ttyS2“`:
stty -echo -F /dev/ttyS2
Print on the standard output every character you type:
Log in to OES Prime in another terminal and write something to “`/dev/ttyS2“`:
echo “hello” > /dev/ttyS2
In the first terminal, you should get what you typed.