Add a real life hardware terminal to that newfangled computer of yours


If you find a crusty old IT guy and give him half a chance, he’ll probably regale you with stories of how things were done “in the old days” where no one had their own computer and everyone worked on mainframe-connected dumb terminals. [JSTN] yearned for a true to life terminal display that he could attach to his 2010 Mac Pro, and since there’s no chance anybody is bringing one to market any time soon, he pieced one together on his own.

He dug up a digital VT220 terminal, and got to work trying to interface this office relic with his shiny new Mac. He found a few helpful tips from someone who did the same thing with an Apple ][c, though that solution relied on emulating a terminal – something he did not want to do.

He connected the VT220 to his computer using an off the shelf USB to serial adapter, but the software side of things still needed attention. A quick gettytab tweak later, he had his hardware terminal up and running without much trouble.

He says that he is more than happy to help anyone do the same, so let the mad eBay scramble for old terminals begin!

[via Adafruit blog]

60 thoughts on “Add a real life hardware terminal to that newfangled computer of yours

    1. An “old PC” burns clock cycles, wastes power and probably interfaces with a new fangled million+ pixel RGB display. A terminal runs on a low baud interface and uses an 80×24 character array. You just won’t get it unless you’re an old timer or understand embedded programming.

    2. Really, it’s more of a nostalgia thing. The clock cycles wasted on emulating a terminal are so incredibly negligible that I don’t even want to think about them. But… nostalgia and cool factor taken into account, I totally get it.

  1. You can happily run multiple terminals off a single machine. This technique can be useful for home automation and similar – replace the glass TTY with an 2-line LCD/keypad/serial-port, and you have a quick, easy, cheap centralised control system.

  2. One thing to take care of is not to power cycle a serial console, some UNIX machines receive a break signal from the power cycle of the tty and stop the OS, jumping into the boot prom.

    Not sure if it would apply to a Macintosh, probably doesn’t apply to the Intel based machines, but may apply to the PPC machines. But there is no harm in always connecting the tty powered on just to be safe.

    1. Never, ever, ever seen this happen in all my years interfacing serial terminals to unix boxes, sounds like a load of bunkum.
      A unix tty ‘break’ signal would never normally cause a reboot even if it was generated at the point a terminal was powered down. Think about it – if it did, any user could then reboot the host just by sending a break.
      My best guess – I think you’re mistaken – is that perhaps turning off the terminal in your case caused a power spike that triggered a reboot on flaky hardware.

      1. This indeed was the case with Sun hardware for many years. It would drop you to a monitor ROM, aka the OK prompt. I’ve never seen this on HPUX/AIX/DGUX/IRIX or any x86.

        Only a break on the console tty would cause this, meaning you had physical access.
        Whey purchasing a console server they even have/had a name for it, sun break-safe.

        Some models had a front keyswitch, others nvram settings that were intended to prevent this.

      2. Never seen it in all your years… You obviously haven’t many years.
        I think it’s mainly Sun machines that do this and it’s got something to do with taking one of the signal lines low when the machine isn’t expecting it. That will push you out to the OK prompt.
        If you’re only running TX/RX and none of the other connectors (CTS/RTS/DTR…) then you won’t have seen it happen.
        It used to be a nightmare for me, serial ports connected to other machines and someone reboots their box and takes your’s down with it. They never tell you till you’ve been called out at 4AM…

        There is something similar if you short 2 lines together, that’s taken as a UPS panic signal and the machine will do whatever it should when power is not guaranteed (shutdown cleanly).

    2. As far as I know, this *DID* happen, but only with “headless” SUN hardware, and *ONLY* if it was connected to Serial A, which became the “console”, since there was no keyboard/monitor attached. If you had terminals connected to Serials B, C, D, etc., they could be turned off without issue, but the “console” had to remain powered on.

      1. I’ve seen it on a sun also, but only on the console port. It’s a weird sun debugging thing. Come to think of it, I remember that there was some way to do it on a DEC Alpha…

        Having this happen to any old serial port is lunacy, though. When I was 12 or 13 I went to work with my dad when he was doing maintenance on an IBM RS/6000 and they had to have had at least 300 serial terminals on that machine. Each was connected to a port concentrator that hooked into the SCSI bus. We sometimes had to go through a huge list of devices updating the huge list of bauds in gettytab

      2. I can vouch for that. I have here an UltraSPARC5 who when running, typically wears a serial cable plugged into that port. And when I select the break command on the features pulldown menu for Putty, it promptly causes the system to present the OK prompt.

        A desirable function, as that machine always ran headless in its previous life, working in some fashion at a financial house in NYC.

    3. Some unix servers did in fact have a designated console serial port with special functionality that would shout down the system when the console (sometimes called the master terminal was powered off. On several Sun systems this would be handled in the openboot Forth interpreter, and the default actino was a shutdown. If you were familiar with forth, you could define an override behavior to the event that would stop the shutdown.
      AFAIK, Openboot eas used on systems from Sun, Iris, and Apple (some of the later PPC systes and the Tanzania based Apple PPC clones.
      This was only in effect on the designated console port. Other serial ports weren’t affected.

      Being a long time Linux user, and even alonger time Unix guy, (and a crusty old programmer at that), a test terminal is really handy when a system upgrade hoses you X configuration and disables your keyboard. Nowadays, I keep a net terminal connected through the network and a kvm switch, but I have a few old terminals stuck in storage.

      The vt220 have a lot of functions that can’t be made available in emulators. For example, keyboard remapping and the answerback buffer, which are harmless to a terminal, but major security holes on an emulator running on a PC.

      In linux, adding a terminal is as simple as plugging it in and adding a bash profile. at worst you may need to install the terminfo package and compile the ESRs ufo (unidentiified feeping objects) terminfo entries.

    4. I have an old hp125 which is a z80 computer built into a hewlett packard hp2621 serial terminal. The computer retains all of the terminal functions, using 2 cpus (one 4mhz z80 for program execution, another 4mhz z80 for the intelligent terminal functions, and an 8031 that controlls the IEEE488 bus for attaching disk drives and other peripherals.
      The terminal has 2 external serial ports. port 2 is a standard rs232c in every way, port 1 has a centronics style connector with signals for RS232, rs423, synchronous and bisynchronous signals. HP sold several pigtail adapters to permit connection to a wide range of serial interfaces. I want to wire a pigtail adapter for port 1 because the advanced functions of the hp 2621 terminal includes a full range of terminal passthrough device functions, which includes the IEEE488 bus devices and the ability to remote boot the cpm computer over serial port 1.
      I think a remote booting cpm computer would be really retro cool. The problem is that I’ve been unable to track down enough info on the protocol. Many older unix systems had a utility called hpio that could access the hp terminal passthrough devices, but I’ve had no luck finding source code.
      BTW, older Macs actually implemented RS422 signaling hardware, which is compatible with RS232 but capable of up to 10 mB/s with cable lengths of up to 4000 ft. One could network two macs through the serial ports.

  3. Nice to see!
    I use a Camdata microscribe with my homebrew z80 computer also, a Cambridge z88 is also a good piece of kit to use as well (at least for me anyway) as it also has a built in Terminal mode.
    and it`ll work quite nicely with these 433MHz RX/TX radio modules too, via a 74HCT06 or max232 chip.
    there`s plenty of cool things that can be done with these not-so-“Dumb” Terminals ;)

  4. Really you’re just plugging a terminal into your serial port where it was meant to be all along. Unix was built around serial terminals. telnet, xterm, ssh, these were all made to imitate a terminal

    1. But to do this over USB (new Macs lack a proper serial port — as do many other Intel machines) requires a little bit of software hackery. Even running Linux and using a proper serial, you need to rebuild the kernel with a terminal-on-serial flag twiddled (and presumably wire up an adapter so that you can hook a modern 9-pin serial port to a pre-IBM-PC 28-pin serial port, either by digging up the proper connectors or just finding the pinouts and sticking loose solid-core wires into the holes). It may even be that a null modem is needed (and try finding a newly manufactured null modem that will connect two different varieties of serial port…)

      I suspect that this particular terminal is new enough that it uses the same line voltage as modern serial ports, but that isn’t necessarily true of even all glass ttys. On top of that, if you want to use a proper paper line printer, you might end up with one that uses baudot!

      1. RS232 is RS232 and that is what most terminals use. Serial out on a modern mac? USB serial adaptor. DB-9 to 25 adaptor?
        you can even buy a USB to DB25 adaptor. In fact he links to a place where you can buy all the parts you need.
        This is cool but not super hard to do which is a good thing. in fact he lists where he bought all the parts. Now if you want to take it a step farther you could make your own USB to serial cable that plugs right into the terminal, Or you could get a small micro with ethernet. Write your own SSH software and have a dedicated SSH terminal on your network. Replace with Wifi if you wish.

        1. I think making a cable with RS232-USB or using a micro to put a terminal on the network with an embedded device would make this a whole different project, however cool that sounds.

          I like the simplicity here because to most ordinary (MAC and PC) users this kind of hack is beyond their reach, but can bring some fun/learning/nostalgia into their new technology-loving home.

  5. Seems like the hardest part of this job was fighting through Apple’s somewhat-silly software work. I had a similar headache trying to get NFS working correctly on 10.5 (why disable getty anyway? it makes little sense). Nice job on this, it’s definitely got style!

    1. Also, I still use a similar setup to control a fleet of HP servers that we have over their RS-232 connections (the machines forward their POST/BIOS over the RS232, as well as BASH once Linux boots), so I have 5 or so old 4-way serial switch boxes and a terminal emulator on my desk. Still easier to dial in the machine I want that to actually go and find the thing.

  6. This is a cool hack. Anyone looking for similar serial terminals could look in skips (dumpsters) or at tech recycling places. Or in the back of dusty cupboards at workplaces. These terms were used in many businesses.

    1. I used a teletype once. It was in the corridor outside the computer room. The access to the room was controlled by a PIN that you could check by “cat /etc/pin” or similar. Of course you had to be inside to do that, unless you were brave enough to use the teletype.
      It really makes you realise why Unix commands are mainly 2-3 letters and with single letter options.
      None of this “–verbose-option” on a teletype.
      It also makes sure you check the code before leaving the room next time.
      Ah, those were the days.

      1. …and nothing, I mean *nothing* sounds like a Teletype. I miss the old boxes of bolts. Absolutely amazing what they did with levers and clutches to print serial data. Descended from the Morse code key, it made it into the computer age (just barely).

  7. I use Mainframes everyday for work, using a 3270 terminal emulator is fine, but more than two colours is crazy! I want one of these but I’m not sure how the company would feel trailing a huge serial cable all the way from our z10’s though =^p

    1. The 3270 is not a serial terminal, it is pretty much like the web without pictures and Javascript; the terminal gets a menu sent to it in a data burst, displays it, the user puts some data in fields, and sends the result back in a short data burst. Like the web, just from 1972. And no hyperlinks proper. More like menu selections.

      Serial terminals like the vt220 send every character down the line as soon as it is typed. Big difference. The display on the terminal then gets its data down the line from the computer. The fact that characters show up as soon as you type them is because a program on the host decides to echo them, whereas the 3270 does that by itself.

      SSH and telnet work the same way; the RS232 is substituted by a TCP connection with optional encryption, and the terminal is replaced by software in the client end. Still, the software of the far end of the connection echoes or not.

      I haven’t hooked a serial terminal up to a Mac, but frequently use my Mac as a serial terminal with an USB adapter; mostly to talk to routers and switches but also the occasional Unix host. I prefer the Prolific PL2303 chip, or one of the FTDI chips. Good drivers exist for both. ZTerm btw needs an Intel build.

      1. PDP-10 and PDP-20 where mainframes they where 36 bit machines. The PDP-11 was a mini and the Vax was a super called a super mini. Just for a bit of fun triva the PDP-10 is what ran compuserve.

  8. Find an old 2*20 display in an old music centre.

    I have one here, which looks like serial input.
    A bit of PIC programming-fu and it could be used as a weather display etc.

    Even better hack, find one with a bargraph VFD and make a spectrum analyzer with it.
    A bit of hackery using an array of old TV tuners and a voltage divider… voila!
    Guess how many of these you can find down the scrap yard, just waiting to be saved from landfill.

  9. @mansaxel Yeah, those are nice.
    Sparkfun do them last time I checked, and they make an ideal bootstrap chip for micros to connect to the PC.

    Wonder if anyone has tried doing serial over Bluetooth headset using the A2DP?
    i.e. use a LM567 tone decoder on the Rx end to convert the audio into serial.

    Wouldn’t be very fast but cheap as chips, and you could even update from your Iphone/fondleslab/Nokia/etc.

  10. Serial to USB def works, but I thought the new Apple boxes with their EFI had a real serial console which would let you get to an OpenBoot like terminal. And, I think, even a LOM. No?

    Or is this just the server line I’m thinking of?

  11. I’d love to try this. A terminal I could get away with putting down in the garage.

    My previous work site used PDP-11/70s as test bench controllers up until 1999, when they switched to PDP emulators on a PCI card. S/w inertia, it ain’t just for banks!

    I considered it a major advance when we finally managed to exchange VT-100s for VT-220s (or a 320!).

  12. SO COOL! I can think of so many uses for this. If you are running a web server, why not tail your access logs? A geeky decoration that actually has practical value. Or, if you have snort set up, show snort alerts in real time. Or firewall blocks.

    This makes me get all hot and bothered.

  13. I like it but I really would like to see how to merge the two keyboards. My desk is already full with stuff and there is no space to put another keyboard down.

    Would be awesome to use only a single keyboard and somehow switch between the two systems. Maybe a regular keyboard switch (+ a uC) can be modified to provide terminal and PC output?!

  14. The first time I compiled Linux source, (Potato) I saw the option for “Console on serial port”.
    Never looked back!

    I use a Wyse mainly but I have a VT-100 and a VT-132 as well.
    Having man pages on the Wyse or running a session of pstree or top is great.

    One thing I have noticed is LONG after you have last the console on the host machine and cant get back to X, the serial port console will still be running, you can at least reboot or restart X.

  15. While this may be “cool” and all, it’s incredibly wasteful. A VT220 draws 60 Watts. That’s the same as 6 average laptops. Not to mention the wasted desk space.

    Hey, I did this too, a couple years back. Realized it was stupid pretty soon.

    1. Is the 60W for the one in the photo?
      Mine is rated @30W.
      Why you think this is stupid kinda makes me wonder.

      I have a “few” Data General terminals, they are not ANSI, VT52 or VT100 compatable.
      What we did was make a “breakout box” that just diode OR’s all the RX and TX lines together.
      That rig has been doing the rounds @parties for years.
      People, especially drunk ones get a kick out of “local chat”, go figure.

      This is way more useful.
      As for the power consumption, since when was that a consideration?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s