Pyterm Virtual Terminal For Use With Old Serial Terminals

2022-12-05

Preface

As of the time I'm writing this blog post, I have been elected as next semester's Junior Tech Director at the Computer Interest Floor at the University of Rochester. The club is a great place for people of all majors to interact, and one of my favorite perks of being a member is access to the lab. While at the lab, I took interest in an old serial terminal that was used to control the old sound system. Specifically, the model is the Wyse WY50. Old technology piques my interest greatly, so I made it my goal to run a modern Linux terminal on the WY50.

Research

The first thing I found concerning this subject was this YouTube video by Veronica Explains. The Video was great and explained everything very well, but the terminal used in the video was a Wyse WY55, not the Wyse WY50. An important piece of information gained from this video is that the WY55 can emulate a VT-100 terminal, but the WY50 cannot. This means that the WY50 will take some more effort to connect to Linux, since the VT-100 seems to have become somwhat of a standard or base for modern terminals.

Thanks to this post by DJ Adams, I was able to learn about agetty and ncurses-term. Agetty is a much better alternative to the serial-getty systemctl service. Ncurses-term contains the proper escape codes for all of the different terminals, including the WY50.

Prerequisites

You will need a null modem cable to connect to your terminal. You will also need a USB to serial adapter to connect to your computer.

Null Modem Cable

nullmodemcable

Serial to USB

serialtousb

Then, you will need to download pyterm. The repository is linked here. Alternatively, the individual pyterm.py file can be downloaded here (right click the page and "Save Page As..."). Also, make sure you have agetty and ncurses-term (sudo apt install ncurses-term for Ubuntu users).

How to Connect

In your terminal, type ls /dev/*USB*. You should see something like /dev/ttyUSB0 as an output. If there's no output, then your terminal is not connected to your computer. Then, type agetty -L ttyUSB0 19200 wy50. This will connect to the terminal using the wy50 escape codes and 19200 as a buad rate. Make sure these are the current settings in your terminal!

Then once you're connected, you may notice visual glitches. Just make sure you have pyterm.py downloaded and enter python3 pyterm.py. Now you should be in the virtual terminal!