Skip to main content

Serial Port

RS232

  • Confirmation of serial devices

    The RS232 serial device for Radxa CM3I IO Board is /dev/ttyS2.

  • loop test

    • Short the RS232 TX and RX of Radxa CM3I IO Board.

    • Use rsetup to open the Overlay for /dev/ttyS2

    • Setting Serial Port Parameters

    sudo stty -F /dev/ttyS2 speed 115200 cs8 -parenb -cstopb -echo
    • Open two terminals, one as a receiver and one as a sender.

    • The receiving end uses the cat command to receive

    sudo cat /dev/ttyS2
    • The sender sends any value to /dev/ttyS2, such as
    while true ;do echo "sss" > /dev/ttyAML0; sleep 1; done;
    • If the authentication is successful, the receiver can receive a message from the sender.

RS485

  • Introduction of RS485 to USB Module

    This is an RS485 to USB module as shown in the figure.

  • Connections

RS485 to USB Module<-->Radxa CM3I IO Board
GND<-->GND
A<-->RS485_A
B<-->RS485_B
  • RS485 USB serial port to PC, Radxa CM3I IO Board set RS485 baud rate to 115200.

  • Open the serial port tool on the PC side, and set the corresponding serial port and baud rate, here take Linux as an example.

  • Radxa CM3I IO Board send any value, the host side serial port print can be received