Connect to a serial console in Linux
I needed to connect to my Dell S4048 and Dell Z9100-ON switches over a serial port in Linux.
I connected my RS232 cable to the Dell switch, but somehow I got weird characters after connecting.
The specifications on the Dell site said:
- 115200 baud (set the Micro-USB console port to 9600 baud).
- No parity.
- 8 data bits.
- 1 stop bit.
- No flow control.
I tried minicom and cu, without success.
In the end Kermit did the trick, with this config file ~/.kermrc:
set line /dev/ttyUSB0
set speed 115200
SET CARRIER-WATCH OFF
set flow-control none
set parity none
set stop-bits 1
In my case the device was /dev/ttyUSB0; use whichever device yours is.
After starting Kermit, type connect and Kermit will set up a working connection.
Backspace not working in Kermit
After connecting, the Backspace key did not respond. Edit ~/.kermrc and add the line:
set key \127 \8
Start Kermit again and Backspace should work.
Simpler alternatives
Two small tools that also work well, with fewer settings:
sudo dnf install picocom tio # or: sudo apt install picocom tio
picocom -b 115200 /dev/ttyUSB0 # exit with Ctrl+A Ctrl+X
tio -b 115200 /dev/ttyUSB0 # exit with Ctrl+T Q; reconnects automatically
Getting Permission denied on /dev/ttyUSB0? Add yourself to the dialout group, see Allow a user to access serial devices.