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

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.

Depends how old we’re talking. Could be a 5150 with an MDA or Hercules (which is about 128kpixel) and a very VT220-like appearance, and a more guaranteed compatible RS232 port (…well, so long as the previous owner installed a serial card, anyway). No need even for a hard drive, maybe not even booting MSDOS from floppy, just let BASIC load from ROM then bang in a few lines of code that will copy any characters from the keyboard to COM1 and echo anything that comes in from COM1 to the screen. Which will work as a very simple “glass TTY” terminal; if you want something a bit more complicated that can respond to VT100/220 (or even just VT52?) or ANSI control codes, there’s almost certainly suitable comms programs that can be loaded from floppy… I mean, I remember such sophisticated things being available for the ST, including the original low-RAM, no-ROM-OS, single-sided-disc models, so the PC should have similar.

The original PC’s power supply was notoriously underpowered (which is why I specified that rather than the XT, or even a 286-class machine even though those were themselves often found supplied with Hercules cards and mono monitors, or even MDAs in some cases), bad enough that hard drives typically needed an additional PSU and maybe an external expansion enclosure, so it probably doesn’t waste a great number of watts vs a straight terminal…

Though if you’re that bothered, get something like a C128, Amstrad CPC, BBC Micro, later Apple II, or any other old 8-bit micro that has an 80-column mode and a serial port of some kind. Green/amber screen 15khz monitors were also available, even as a bundle with the computer in some cases, and putting the two together plus whatever suitable comms software you can find for them might actually end up using less power than the terminal would have.

(Or in fact, better yet, a PCW; that’s essentially a modest sized monochrome terminal with a built in Z80 processor card, a pile of memory and one or two floppy drives… no separate system box, and as it’s CP/M based you can probably find some software that will not only operate as an actual terminal – with the enhanced 90×32 text grid no less – but as a one-way display-only device with the keyboard disconnected if you want to save desk space and just use it as an additional text-only monitor instead of a true terminal)

…just thought, though – one advantage the VT220 offers is that it can run a 132 column mode, and I think maybe 50-row as well, which is something the PC couldn’t really do until at least the Super-EGA and multisync era, if not the VGA era (as you need at least 792 horizontal pixels for even a scrappy 6-pixel-wide font, and even EGA’s 350 lines would be somewhat cramped for 50 rows and is more comfortable with 43 or less). It might be a bit squint-tastic if you have the screen placed quite a long way back on the desk, but if you have it sat relatively close to your keyboard it’d be perfectly readable at 132×50 (I’m sure I’ve used that for Pine and Lynx at least) and fit a lot more information on screen, and even be capable of rather more useful block graphics at 132×100 or even 264×100… without being any larger than a typical monitor, with no separate system box, and no greater power use.

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.

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.

Seems a bit like a reinvention of the X10 standard though? Which only manages about 100 baud, but that’s enough for most applications of that same type (you can’t type faster than 10 characters/sec, and it’d fill a 20×2 display in 4 seconds if using 8-bit ASCII), and has the advantage of not needing you to run multiple serial cables all over the place as it uses a powerline interface instead… and as it’s considered a bit old hat in these days of near-gigabit powerline networking and wifi/bluetooth controlled home smart-device hubs, should be quite cheap to put a system together with.

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.

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.

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).

Well, there’s a simple way to check – get the article author to try it and report their experiences. I have a feeling that it won’t make a jot of difference to an OSX Mac with a serial-emulating USB adapter hanging off it… if only because the “console” will be considered as the computer’s main screen and keyboard, or at least the built in video adapter and the main USB keyboard driver. Any serial terminal you might connect to it would count as an additional TTY:, not the CON:. ISTR the distinction between those two things being important even under MSDOS; the CON could be redirected to various different TTY sources, whether the default built-in keyboard and screen devices, or one of the COM ports, or the LPT, some other exotic device with an installed driver and addressible device name… etc.

Whereas for an old headless Unix server, the console *has* to be a connected terminal, but one that is connected to a particular dedicated serial port, and might be switchable through a KVM-type box that tricks each server you can switch the terminal’s IO to that the terminal is connected (and idle, rather than sending breaks or whatever) even when it’s actually sending to and receiving from a different one…

(though really you should be able to disconnect without that sending a break – that’s officially the sending of an over +3 volt active signal for longer than a full character space, ie about 9 to 10 bit times in common setups; maybe the signal remaining in the undefined -3v to +3v zone for more than about a tenth of a second (or ~8 bit times at 75 baud running 6-bit baudot, ~11 at 110 baud and 8-bit characters plus parity or 9-bit non parity…) would instead be taken as “console disconnected, panic stations!”… in which case all your switch box would have to do is hold the data line at a steady 3 or more volts negative… the other question I suppose is whether it demands acknowledgement from the terminal for each character transmitted to it, and panics if there’s no intelligent response for more than a certain period, but that seems like it would be very inefficient of bandwidth and a sort of backwards version of full-duplex remote echo mode…)

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.

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

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.

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.

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.

Depends how smart the BIOS is and if it can recognise the USB adapter as a serial port in the same way as it can pick up the keyboard and mouse. Otherwise you’ll have to take a look inside the computer’s case and see if there’s an unused serial port header hidden away there… which is more common than you’d maybe expect, but not universal.

Nice to see!
I use a Camdata microscribe http://www.camdata.co.uk/telecomms.htm 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 ;)

Wait, using the Z88 as a terminal, or as a host that you plug the terminal into? The latter seems like it would make more sense, given the very limited built-in display compared to the actual power of the machine… all you really need to make it into a “proper” computer is a larger screen and software redesigned to take advantage of it… even using the terminal’s own keyboard would be strictly optional.

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!

RS232 is RS232 and that is what most terminals use. Serial out on a modern mac? USB serial adaptor. DB-9 to 25 adaptor? http://www.cablestogo.com/product_list.asp?cat_id=101
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.

Null modem is just a particular type of cable, and it’s very easily available. Until Maplin shut down a couple months ago, you could just walk into a high street shop in the UK and buy one off the shelf… in fact I picked up one on the just-in-case for a pittance during their closing down clearance sale. But there were plenty of online sources for the same stuff (kinda why they went out of business), and so it remains. I had reason to order a couple at different times in my last job, because there’s plenty of modern day AV equipment that still includes a serial port as the defacto method of basic digital remote control and status reporting, and even if you already have a USB to serial converter for some other reason (eg hooking up an older interactive whiteboard), you still need the cable to go between the converter’s port and the one on the device you need to do some settings hacking on.

Also, the RS232 standard defines everything necessary to transmit data between any two arbitrary devices, including the voltage levels and the pin assignments for various common connectors. So as long as the terminal is RS232 compliant, you should just be able to plug it into anything else that’s also compliant, so long as you can get the passive adaptor to mate up their ports.

Though the problem you might encounter is actually with cheap USB to serial converters; technically RS232 is supposed to use -12v as “0” (or idle) and +12v as “1”, but as they run off USB’s single +5V supply, and generally lack both the space and budget for a full voltage booster/inverter chip or circuit and likely just have a very simple inverter built in, can only really manage about +4.8V and -3.8V output.

The letter of the standard says that anything from +3 to +15v and -3v to -15v should be accepted (with only -3v to +3v being the undefined, unacceptable zone that signals should only pass through briefly when switching between high and low), and enough devices actually produce just -5v and +5v that those levels should be accepted, but running even lower such to skirt close to the allowable minimum might end up running into incompatibilities, especially with longer cables. And as a mainframe that the terminal might connect to can be reasonably expected to have all kinds of voltages available well in excess of 15v both positive and negative it might not accept even +/-5v…

The more likely problem though is that it’s designed for some other serial data standard than RS232, which is only really rated for cable lengths of around 15 to 50ft, and officially only 20kbit/s with the shorter cable run. RS422, 423 and 485 may be used instead, all of which are related to each other and RS232 but all mutually incompatible… but each support cable runs of up to 4000ft, and data rates of 100kbit to 10mbit, plus “multidrop” (ie several devices on the same cable) support and other things that would be useful for a one-server many-client setup.

Happily though you can also get USB converters for RS422 and 485 (which are particularly exotic vs 232 because they use differential signalling rather than simple negative-vs-positive, to eliminate shot noise and other simple interference), and it might be possible to twiddle a 232 one into 423 compatibility as that’s non differential and officially uses +/- 6v signalling (though the levels are reversed, ie -6v is “1”, and the minimum is a higher +/- 4v) and shares some of the same control lines (ie RTS and CTS)…

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!

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.

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.

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.

…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).

Even moreso than that, it’s a serial data transmission standard that *predates the telephone* by about 3 years, at least in original form, and more particularly predates the internal combustion engine. The more widely used “modified Baudot” form that then remained in use long enough to be turned into computer terminals was pioneered around the same time as the death of Queen Victoria in 1901, and came along only shortly after radio stopped being a short-range laboratory novelty and was itself starting to be used for telegraphy (the first marine use in fact being 1902) and was a standard that competed with Morse Code for continuous-wave (ie, before even the modulation of signals onto a carrier, let alone the modulation of *voice* or music signals) transmission…

Which is why it’s all a combination of cams, clutches, and so-on. Because that’s how it was originally built in the 19th century and why change what works perfectly well, even if it’s a 60+ year old design? Especially when trying to synchronise a newer all-electronic version of the machine with the existing mechanical ones would have been about as difficult as just keeping the old design (which could be governed quite precisely by varying the motor speed and had both synchronising pulses to control that as well as a fair bit of slack to cope with mechanisms that were still somewhat adrift of the standard even so), especially in the vacuum tube or early transistorised age where the solid state gear wasn’t quite as reliable or consistent as what we expect in the present day.

The wikipedia article about the standard alone is quite an eye opener, it’s a really clever bit of late-1800s tech and makes you wonder what might have been if Babbage had met with more success and someone had the idea to connect a teletype to a difference engine 50+ years earlier than the equivalent innovation actually happened…

I’ve had to use MSDOS with an inkjet printer as the TTY when my monitor blew up at exactly the wrong time and I needed to copy files off onto disc to finish editing elsewhere… even that was tedious vs the on-screen interface, even though the printer was reasonably quick and quiet (and let you prop the lid open to see characters as soon as they were free of the platen) and the normal keyboard was still functional. Having to deal with a clattery, whirring daisywheel impact printer for output and the clunky typewriter or even cash register-like keys (and ~11cps max both ways) of a real teletype for everything the computer does… no thanks. You’d definitely appreciate the ultrashort command names and their typically super-economical output feeds :)

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

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.

The 3270 and its ilk were amongst the first really widespread uses for corporate LANs, even – before there were any practical personal computers and certainly long before anyone thought of hooking *those* into internal client-server and peer-to-peer networks, they were using Ethernet and Token Ring to communicate with the local interface controller (equivalent to a router or switch, kinda) and through it the mainframe, whether in-house or at the other end of a high speed digital telephone link (at anything up to 56kbits… in the 70s!). IBM were actually doing some cutting edge stuff, which possibly explains – even whilst also making it surprising – how they ended up playing catch-up in the PC arena and had a few misfires before finally catching the public’s attention with the 5150… One of the common option cards for which in fact being a *hardware* 3270 emulator (because the machine itself lacked the power to keep up with the data bursts using software alone, and certainly didn’t have any suitable built-in ports…)

The PDP-10 also seems old enough that it was mainly used with teletype style terminals rather than “glass TTY”s like the VT series. Though it might have been used with some of the early models like the VT52, particularly in the case of the Compuserve machines? Still, it seems rather more likely that you’d set up a mini like the PDP-11 with a CRT terminal, both as a space-saving measure (as you’d have an 11 because you lacked the space and electrical current for a mainframe and didn’t need hardcore computing power) and because you had a bit of money spare after buying the cheaper model of computer and not having to allocate as much budget to the energy bill… as well as it coming along a little later than the 10 and representing the vanguard of a newer, slicker computing paradigm.

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.

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.

Well, if you just want to use the terminal as a secondary display, you could set up whatever TTY server utility runs on the host machine to act as output-only and accept input from the local console as if it’s a remote one when its icon is clicked on, as well as messages from whatever other programs running on the computer are text-terminal compatible.

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?

Well, it’s not particularly going to make the difference between fireball vs snowball Earth, but it’s worth bearing in mind in case the extra $30 a year in electricity is important to you. Though I expect that’s a maximum rating (whole screen set to flat high-intensity “white”, beeper sounding, and both sending and receiving at maximum rate with all the keys pressed at once) and the average consumption is probably closer to the idle level. Though as you’re running a CRT plus a fair amount of early 80s logic that was never designed with any kind of energy efficiency in mind, that could still be 15-20 watts…

Hmmm… I wonder if my old university has got rid of their green-screen VT220s from the library yet. When I was there in the early noughties they had been relegated from a presumably more prominent place in the main computer rooms to a couple banks of catalogue enquiry stations … but they retained an option on the menu to drop out to a terminal session running on the main server, and you could log in to your main account… fire up Pine for email, Lynx for textmode http://www... and some flavour of text editor though I forget what. Could probably have run other Unix programs but I never thought to try.

Just those two apps were pretty handy though, if you just needed to do some simple information searching or reading/sending messages whilst all the main internet computers were tied up (this was in an age before internet to the halls of residence or your shared digs unless you were quite flush, never mind smartphones), and the experience was really rather pleasant… those old terminals were very nicely made, screens were sharp and easy on the eye, had decent keyboards and were surprisingly responsive even at something like 19200 baud… would be a fun thing to have as an additional screen running off the laptop when it’s on a desk maybe…