Quick quiz: Which is more important, health or fun? (hint: I chose the latter this time around… And you’ll see why!)
Some of you who follow my tumblr might have seen me talking about my newly-aquired ADM-3A and getting a VM to talk to it. If you want the whole story, read up there. Its got some cool pictures, but I’ll sum it up: I wanted to one-up Ray with his ASR-35. His hack for doing 9600 baud RS-232 to 110 baud Current-Loop is worth is own award — he’s done lots of things with serial and trying to get two PICs talking in sync.
I’m a fan of the game Portal. Since I started playing it, I desperately wanted a VT100 or the ilk, searching for someone giving one away. Recently, one of the Quelab members, Jeremy Hoel, went and visited a collector in Santa Fe for some old Amiga & commodore stuff. First round scored some awesome grabs, but the second round got me what I wanted (PS: thanks Jeremy/Richard! I really appreciate you guys finding this damn thing). I had mentioned that I was looking for one of these old-school serial terminals, and I was rewarded with an ADM-3A. A little background, though to start…
The ADM-3A was produced by the Lear-Seigler corporation, the brainchild of the man behind the Lear Jet. It became an instant success, and has been a pivotal point in some classic UNIX history, including Bill Joy building
vi on it. Joy was so influenced by the layout of the ADM-3A’s keyboard that the movement keys, HJKL, that are used in vi are directly from the ADM-3A’s keyboard. As well, “:” is its own key on the ADM-3A.
when I got this, I knew I’d have to drag out the old serial stuff from my father’s collection. The ADM-3A defines “DTE” as an end in serial. The back of the hulking metal case reads “MODEM” and “EXTENSION” — the latter going to a *second* serial device, such as a 10-key input pad that was optional. Originally, the ADM-3 didn’t have lowercase, and the 3A added the optional “Lowercase ROM” which contained all the scancodes for working with lowercase.
What makes this terminal special however is the display; produced by Ball display division (even back when it was Ball Research Associates) the display tube has such labels as “EMITS X-RAYS”.
Now, for the technical details, there’s some things to mention: the BSDs are different than the Linuxii.
In my VM, I had it running under Debian/kFreeBSD. This implementation uses the FreeBSD kernel with the Debian user-land. As a result, it feels like Linux: it runs GRUB, has an
/etc/ that feels like Linux, has things like
/etc/inittab. It feels like SysV. However, I can’t just stick a VM into the real world very easily, so I put it on a laptop I had kicking around (1.6Ghz p3 — simple machine, really). Thus came a tribulation of Debian/kFreeBSD: You can’t load non-free binary blobs. At all. As it turns out, the Debian project was so upset at the FreeBSD project, they stripped out any and all drivers with binary loader capability. I need the ipw2100 driver for my wireless card, so that didn’t work out.
Overall, I’m going to say that I’m quite impressed today with FreeBSD. It’s stable and works just about anywhere I put it so far. If I had to pick a UNIX-like environment, I’d pick a FreeBSD-based one just because its got the right feel. FreeBSD aims to be a tiny sort of environment: the single install CD contains the entire ports tree, the kernel, games, and manpages. Debian on the other hand has a “netinst” image which weighs in just under the FreeBSD install image, yet which barely installs the base system and needs a network connection to even start working nicely. So much for that.
Running real FreeBSD is a totally different beastie. For example, in Debian, you can just say
apt-get install frotz and it pulls down the Frotz Zcode interpreter. However, in FreeBSD, there’s a system called Ports. In Ports, you do
cd /usr/ports/games/frotz/ && make all && make install to make and install Frotz. As well, Debian ships with
bash as its default shell for everyone. FreeBSD? It has
ksh (in recent versions that is).
Getting back on track, the serial terminal configuration is different. In *nix there’s a user-space daemon called
getty (which stands for Get TeleTYpe) that spawns login prompts and handles logging users into the system. Under Linux (and Debian/kFreeBSD) this is handled in
/etc/gettytab, which specifies which runlevels things get started on. FreeBSD has no concept of runlevels, and thus figures if you’re going to run something, you know what you’re doing.
So, in linux, you would have an entry in
/etc/inittab that looks like this:
s0:2345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
specifying that the identifier “s0” (serial 0) runs on levels 2,3,4,and 5 (single, multi, graphical), it spawns
/sbin/getty with the arguments of Local Connection, 9600 baud on ttyS0, with a terminal type of
vt100. However, in BSD land, there’s a file called
/etc/ttys. In my case, the line is
ttyu0 "/usr/libexec/getty 3wire.9600" adm3a on secure
This specifies that on the device
ttyu0 (tty, UART 0) the program
/usr/libexec/getty should be started with the argument “3wire.9600” (9600 baud, no control signals — I’ll get to this later) and that it should set the
TERM variable to “adm3a”, enable the line for usage, and allow root to log in. In a real environment, you would never allow root to log in on a serial console, but there are exceptions (e.g. Out-Of Band management).
The biggest difference here is that linux names serial lines ttyS* and BSD names them ttyu*. This isn’t universal — Linux will name USB connections ttyUSB*, while BSD will keep naming them ttyu*, but there are some cool hacks you do with FreeBSD which name things ttyp* (multiplexed software serial over parallel/lpt) or which create tty devices with different naming schemes.
Now, about that “3wire” thing. Wikipedia will tell you there are about a dozen lines in a serial connection, including the actual data and ground lines. This was from back in the day when DB-25 connectors ruled the world and there was a need for making sure both sides talked at the right speed and didn’t clash. Nowadays, there’s little need for that, as most devices have hardware serial which can keep things synchronized more effectively. It also allowed for modems to say “I need to finish sending this..” and the PC side to say “I can take information now!”. The ADM-3A in my case doesn’t need to have those signals (it in fact only uses them when sending, not receiving) and my FreeBSD system wouldn’t recognize the connection until I set getty to ignore the control lines.
Right now, if you stop by the space it will probably be doing what I set it to do when I hauled it in: search Twitter for any mention of ‘quelab’,’hackerspace’, or ‘makerfair’. If you really do stop by Quelab and its not being used, it has some of my personal favorite infocom games running on it — just type ‘rungame’ for a listing.
Tags3D-printer 3d printing 2600 adafruit air Arduino audio Bubonicon class classes crafting crowdfunding DIY event events gamenight general meeting hack hacknight Ignite Instructables inventables LED Linux Maker Faire makezine marblebrewery meeting Meetings music NMTC pictures potluck privacy Projects public night pyp recap robots space steampunk TechMas theme video Workshop