[Workaround Provided with Existing Packages] Include serial tty such as 'screen'

Problem/Justification
Some remote locations have truenas devices for data collection. Prior to ‘scale’ we used ‘screen’ to access nearby devices over serial - ‘screen /dev/ttyUSB0 115200’. There doesn’t appear to be a serial tty application any more in ‘scale’.

Impact
No impact on the quality of truenas to include ‘screen’. Simple and effective application for field personnel to access nearby serial-enabled devices.

User Story
Field techs that aren’t IT specialists use the common ‘screen’ application to communicate with devices over serial connections.

cu is available and does that.

Spent some time with cu:

root@STORAGE[~]# cu --line /dev/ttyUSB0 --speed 115200
cu: open (/dev/ttyUSB0): Permission denied
cu: /dev/ttyUSB0: Line in use

lsof doesn’t list any other process using ttyUSB0.

Assuming this topic doesn’t get deleted we ended up getting what we wanted.

$ install-dev-tools

$ apt install screen

It’s fine if your environment is OK for extra tools and libraries. Maybe TN will consider including screen in the base packages again.

1 Like

Something odd happened with screen over the last year or 2. (Or longer, my job site is always on older, but still supported, Linux distros.) RedHat deprecated screen in RHEL, (RedHat Enterprise Linux), because it was not getting updates. RedHat claimed that could lead to security flaws not being fixed. Thus, they started distributing tmux as a replacement.

Your use case does point out that replacements like tmux might not have like for like feature compatibility.

2 Likes
root@STORAGE[~]# cu --line /dev/ttyUSB0 --speed 115200
cu: open (/dev/ttyUSB0): Permission denied
cu: /dev/ttyUSB0: Line in use

Think the last line is a red herring “Line in use” resulting from the permission denied above, interestingly enough even root seems to need to be added to the dialout or tty groups to use these. (nut is a member of dialout in order to use serial ports for upsd)

Does this work if you manually add your root user to dialout and tty as additional groups?

1 Like

Adding root to dialout made it work. In any case, I have screen as required. If I see a serious CVE I’ll reconsider retooling to cu.