A very long time ago, on take your child to work day, I went to my mom’s office. I got some stickers for something, then I traded them for this dumb terminal (they were award points for something at the office). This is an ADM3A, from 1977. It is all discreet logic chips, no major integrated circuits. This terminal is where the HJKL navigation keys in vi come from (vi was written on one and those keys have arrows on them on its keyboard). It’s also where the ~ = home directory in unix comes from as well, the ~ key is also the home key.
About 8 years ago, I thought it’d be a fun challenge to get this thing on the internet. I found an old laptop with a serial port, put linux on it, and configured it to use the serial port as a console. I ended up getting it online, and on IRC and Google Talk.
I found this terminal again recently, and wanted to get it back online so I could snag a pic of it on retro.hackaday.com. Unfortunately, it didn’t seem to work anymore. I took a look at it, and the part that failed turned out to be the big clunking mechanical power switch. It had gotten dirty and corroded. I took the switch apart and cleaned it out, and now it works again. Amazing for almost 37 year old electronics.
This time, however, I didn’t have a laptop with a serial port handy, so I made a MAX232 serial adapter for a raspberry pi and hooked the pi up to the terminal. The serial adapter is just a typical MAX232 circuit, I pulled it right out of the datasheet, page 7. You can get these things on ebay for a couple bucks, but I had a couple MAX232 lying around and I figured I could put a header for the pi right on the board, instead of having to make an adapter cable. I only bothered to hook up the tx and rx lines, I skipped DTR and CTR. I used a standard serial port header like motherboards used to have for the serial connection, so I could easily swap between 25 pin serial (which the adm3a has) and 9 pin serial. I had a bunch of the serial port header cables on hand as well.
Here are a couple pictures of the adapter:
On the software side, the pi is running Wheezy. This serial terminal runs at a max speed of 19200 baud, but I went with 9600 baud (because it’s a common default). The pi had a lot of config for using a serial terminal at 115200 baud. I got most of my information from this article describing how to use the pi as a serial terminal and what to disable to prevent it being a serial host.
In /boot/cmdline.txt, I made sure console and kgdboc (kernel debugging) were set to the serial port on the header and to the right speed
In /etc/inittab, I changed the getty line for the serial port to the right speed, and defined the term as adm3a, since the adm3a predates the vt100, isn’t fully compatible, and has different control characters (e.g. the arrow keys on hjkl. the only way to delete characters is ^h).
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 9600 adm3a
I added a TERMINFO location definition to my .bashrc
# set terminfo location to location with adm3a
I was a little surprised to find that Wheezy still includes terminfo definitions for terminals this old (and older). The terminfo directory is 6.5MB.
After these changes and a reboot, the pi printed its console correctly to the terminal, with lots of beeping too.
Some programs don’t run very well on the terminal, anything that tries to do color just has all of its control characters displayed on the screen. lynx was unusable without the correct terminal definition.