I’ve long used screen
for a serial terminal on Linux workstations, but its overkill, and having to nest command modes gets confusing if run inside tmux. So, I’m delighted to find tio (thanks @khem ):
It does smart things like:
assume 115200 baud (used 99% of the time for serial consoles)
reconnects if a device is disconnected then reconnected
plays nicely with tmux
To start, it’s as easy as:
tio /dev/ttyUSB0
To exit: ctrl-t q
You can type ctrl-t ?
to see a list of available commands.
cbrake
February 14, 2023, 6:51pm
2
updated to the latest tio and noticed it now has support for saving logs to file.
ctrl-t f
will toggle file log on/off.
The files are named:
tio_ttyUSB4_2023-02-14T12:33:59.log
khem
February 14, 2023, 10:37pm
3
I have switched to tio for sometime now here is my config file ~/.config/tio/config
[coral]
device = /dev/serial/by-id/usb-Silicon_Labs_CP2105_Dual_USB_to_UART_Bridge_Controller_00A3EA00-if00-port0
baudrate = 115200
no-autoconnect = enable
log = enable
log-file = /home/kraj/tio-logs/coral.log
line-pulse-duration = DTR=200,RTS=150
color = 12
[rpi]
device = /dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_0148B73E-if00-port0
baudrate = 115200
no-autoconnect = enable
log = enable
log-file = /home/kraj/tio-logs/rpi.log
line-pulse-duration = DTR=200,RTS=150
color = 11
[bbb]
device = /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0
baudrate = 115200
no-autoconnect = enable
log = enable
log-file = /home/kraj/tio-logs/bbb.log
line-pulse-duration = DTR=200,RTS=150
color = 10
[imx8]
device = /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_DM02RMBQ-if00-port0
baudrate = 115200
no-autoconnect = enable
log = enable
log-file = /home/kraj/tio-logs/imx8.log
line-pulse-duration = DTR=200,RTS=150
color = 9
[usb devices]
pattern = usb([0-9]*)
device = /dev/ttyUSB%s
color = 8
I then do
% tio coral
[14:44:04.602] tio v2.5
[14:44:04.602] Press ctrl-t q to quit
[14:44:04.604] Connected
1 Like
cbrake
February 14, 2023, 10:44pm
4
super neat, thanks for sharing! That will save a lot of time figuring out which serial device is attached to what.