Once upon a time, computers were enormous things that you used via a terminal on which the output device was a printer — a remote typer, a teletype. A TTY. This is long gone apart from computing museums. But it is interesting — if not useful — to discover that a battery-powered typewriter from the mid-80s can be used, today, in 2021, as a paper-based terminal for modern Linux. In fact, you really ought to look at this or this or this for something much more exotic. (For example, it can be a useful terminal for a headless single board computer.)
The EP44 is an electronic typewriter that uses a thermal print head to print on thermal paper or to transfer thermal-transfer ink to regular paper, if you put a ribbon cassette in it. (These cassettes are now rare and expensive, so thermal paper — usually as fax rolls — is the best solution.)
Most interestingly, the typewriter also includes a 3500-character memory, a 16-character LCD display, and a DB-25 RS232 port, capable of communication at 75, 110, 300, 600 and 1200 baud. Here’s another related link. Not sure about this one.
The main purpose of the RS232 connection is to use the machine as a printer. This is relatively straightforward, especially if you have a hardware serial port (DE-9, usually), but it will also work with a USB-to-serial adapter. The printer part of the EP44 was modified a bit and made available as the Brother HR-5 thermal printer.
Because the EP44 runs off batteries and can store some text, you can type on it when you’re out and about, and download that text into a computer when you get to the office or home. There are various ways to do this, but a very simple one involves the UNIX cat command, and the SEND button on the EP44.
Because MSDOS and FreeDOS (but not the WIndows CMD.EXE) have the CTTY command (change TTY), and are both single-user, single-tasking operating systems, it is trivially easy to pass control of the DOS computer to the EP44. This does need a hardware serial port, because DOS cannot drive the USB-to-serial adapters. Doing this allows you to send the text to the computer, and also allow it so work as a serial terminal for DOS.
So, last thing — how about a serial login on Linux?
Turns out it is remarkably easy.
Step one is to enable login from a serial TTY by editing /etc/inittab. Let’s say we are going to use the EP44 at 300 baud on /dev/ttyS0; then we add this line, or uncomment an example line and modify:
T0:23:respawn:/sbin/getty -L ttyS0 300 vt100
This just tells it to create login T0. It has run levels 2 and 3 (no GUI, of course) and uses ttyS0 at 300 baud with vt100 emulation.
Most of these settings can be played with. For example, if using a USB-to-serial adapter, it might create a serial port of the form /dev/ttySX, but it is more likely to give you /dev/ttyUSB0. getty is just the program that does it (the are others — getty on Linux is really agetty, usually, but you can find others including mgetty). -L says this is a local line. Anyway, I created this entry and I rebooted, with the EP44 attached via a null modem serial cable and set to Terminal and 300 baud.
And this is what we see on the little LCD screen on the EP44:
We’re in! The text flowing back and forth as you talk to the computer scrolls across the little screen, for what that is worth … but it is also captured on the printer. Long lines do get truncated… but still, it works. Here is a little session (scanned and thresholded to make it blacker):
So as we use the Linux box, the thermal paper rolls through. If I don’t want to capture the session, I just flip the paper release, so it does not wind through the typewriter. This was done on a desktop box as a test, but you could also connect to a SOC board, like a RPi or something, and do actual system admin using the EP44.