Neutis 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:
/boot/Env.txt: loglevel=10 overlays=uart2
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
stty -echo -F /dev/ttyS2
Print on the standard output every character you type:
Log in to Neutis in another terminal and write something to
echo "hello" > /dev/ttyS2
In the first terminal, you should get what you typed.