RS-485
The Pigeon computer is equipped with a single RS-485 port. The RS-485 port can be accessed under Linux as '/dev/ttyRS485' (the udev rule with this device name was added in the Raspbian image on November 7, 2016). In earlier versions, you could use '/dev/ttyUSB0'. In this case, when using another USB/UART device, the RS-485 port may not be assigned to '/dev/ttyUSB0'.
Useful commands
Check the configuration of the RS-485 port:
$ stty -a -F /dev/ttyRS485
Transmit data to the RS-485 port:
$ echo "test" > /dev/ttyRS485
Read data from the RS-485 port:
$ cat /dev/ttyRS485
Using picocom for Serial Communication
To install picocom, run:
$ sudo apt install picocom
To open a serial connection using picocom, run the following command:
$ picocom -b 115200 /dev/ttyRS485
- -b 115200 sets the baud rate to 115200.
- Replace /dev/ttyRS485 with the appropriate serial device.
Notes: To exit picocom, press Ctrl-A, then Ctrl-X.