RS-232
The Pigeon RB700 Advance has three RS-232 ports. By default, the first Pigeon RS-232 serial port (/dev/ttyRS232-1) is configured for use with the console.
The following parameters are required to connect to the Pigeon console:
- Baud rate: 115200 bps,
- Data Bits: 8,
- Parity: None,
- Stop Bits: 1,
- Flow Control: none.
RS-232 ports are available under Linux as:
- /dev/ttyRS232-1 (/dev/ttyAMA0),
- /dev/ttyRS232-2,
- /dev/ttyRS232-3.
Useful commands
Check the port settings
$ stty -a -F /dev/ttyRS232-2
Send data to the RS-232 port
$ echo "test" > /dev/ttyRS232-2
Read data from the RS-232 port:
$ cat /dev/ttyRS232-2
Disable RS-232 port console
To use the first RS-232 port for connecting and communicating with other devices, the serial port console login must be disabled. The easiest way to do this is by using raspi-config:
- Run raspi-config,
- Navigate to Interface Options,
- Navigate to Serial,
- Select "No".
Warning! After reboot, the serial console will be unavailable, so the only way to access the login shell will be via SSH or HDMI. If using SSH, you will need to know the Pigeon's IP address. For more details, see the nmap section of the Ethernet documentation.
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/ttyRS232-2
- -b 115200 sets the baud rate to 115200.
- Replace /dev/ttyRS232-2 with the appropriate serial device.
Notes: To exit picocom, press Ctrl-A, then Ctrl-X.