Short one: How to make a serial console server (or terminal server) with a Raspberry Pi and USB-serial adapter.
- Have a Raspberry Pi with Raspbian installed (I’m having the original Raspberry Pi Model B Rev 2, use “
cat /sys/firmware/devicetree/base/model;echo” command to identify your Raspberry Pi)
- Connect the USB-serial adapter to a USB port on Pi
sudo apt install ser2net)
/etc/ser2net.confwith for example:
- 2000:telnet:1800:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT banner
- 3000:telnet:1800:/dev/ttyUSB0:19200 8DATABITS NONE 1STOPBIT banner
- 4000:telnet:1800:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT banner
- Ensure that
ser2netis started automatically (
sudo systemctl enable ser2net)
Connect the serial port to whatever device you want to use for testing, and use any telnet-compatible client (like PuTTY) to connect to your Pi’s IP address and the configured port (2000, 3000 or 4000 in this example).
See the man page of
ser2net for information about the configuration options.
The telnet connection is unsecure but you can use SSH tunneling to encrypt the communication between your client host and the Raspberry Pi.