Talking to the EP-44

Talking to the EP44 from a computer is dead easy. First, I wired up a null-modem cable (I ordered one, but it turned out to be a basic extension cable — wires were not crossed over. So I cut it in the middle and crossed them over myself).

Then I attached the cable to the EP-44 and to the serial port on the back of the computer (note, I used a real, hardware serial port for this, not a USB-to-serial converter).

Turned on the EP-44 and set it to terminal and to 1200 baud, 8 bit data.

On the computer, used stty to set /dev/ttyS0 to 1200 baud.

$ stty -F /dev/ttyS0 1200

$ stty -F /dev/ttyS0 -a

speed 1200 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

$ sudo adduser -a -G dialout username

Then typed:

$ cat /dev/ttyS0 &

$ cat > /dev/ttyS0

The first cat command takes anything from the serial port and puts it on the screen — in UNIX, everything is a file, including the serial device. The second command (not cast off), sends whatever I type on the computer to the thermal printer. So one could use this a bit like the talk and ytalk programs on UNIX.

That’s it, it works.

screenshot of a terminal session
Talking to the EP-44: Text on the screen of the laptop
scan of the same text on the EP44 printout
The same text on the EP44 printout

Now, the same connection can be used to send the contents of the printer’s memory (about a page or two of text) to the computer screen. You just press the Text button on the EP44 and cat the port to a file ($ cat /dev/ttyS0 > filename.txt).

Note that this is different from actually using the printer as a terminal, in that I am not sending commands to the computer and getting back the output, though clearly that can be done, seeing as the characters are moving between the two devices.

The text below was typed on the EP and uploaded to the computer using cat.


Blogpost

The Brother EP-44 can be used as an editor and word processor. It’s memory can hold about 3700 characters, which can be edited, modified and then either printed on the EP-44 or transferred via a null modem cable to a computer for printing, uploading or editing. The text you are reading now was written on the EP-44 without any of it being printed. Having said that, the 16-character screen of the EP-44 is not much good for editing. Indeed, if you get distracted and forget the start of the sentence, it can be all to easy to start one sentence and finish another.
I can check how many characters I have left by pressing CODE+r (‘REMAIN’). The manual, available online at http://munk.org/projects/Brother-EP44-User_manual.pdf gives details of the editing functions available. They are adequate, if not easy by modern standards. If you carried around enough equipment, it would be possible to send the text to an office over the phone lines via the RS232 port on the side, but it is hard to believe that anyone would bother. Even in the early 1980s, one of the little LCD notebook computers of the time, like the TRS-80 would be highly preferable (though three times the price). The main benefit of the EP lies in the attached printer, which means it is better used for input than output — input via the keyboard or via the serial line when using it as a printer. Speaking of input via the keyboard, I must say that the keyboard is surprisingly easy to use. It looks like a big calculator but types much better than that. Indeed, you can build up pretty high speed if you try. It works very well on the lap, and the keys are very reliable; you know when you’ve hit one, so you very rarely double hit or miss a character. The gaps between them help avoid hitting the wrong key, and mean that the overall dimensions are those of a full-sized device. Were I to make any change, I would put in a horizontal rather than vertical return key — why? — because I tend to hit it when I am looking for backspace.
One more comment. Although only showing 16 characters, the screen is surprisingly useful. It is big enough to show you the last word you typed, so you can quickly backspace over errors and fix them. If you are used to fixing errors on the spot rather than leaving them and going over the document later, then it is possible to make pretty clean copy without too much trouble.
As a final note, with this much text typed, I currently have 1280 characters left in the machine’s memory. Hence, we can see that the EP-44 (or EP44, depending on which documentation you read) can certainly provide enough space to write up a blog post of more than adequate length, especially when discussing a topic as boring and redundant as this one!
Now, at the end, let’s add in the non-ascii characters and see what can be downloaded over the serial line.
1234567890-=qwertyuiop asdfghjkl;’zxcvbnm,./
!@#$% &*()_+QWERTYUIOP ASDFGHJKL:”ZXCVBNM,.?
+ []{}<> $ \ ;’ #| &!@ *
OK, that’s done. Now we have 719 remaining.


Notes:

  • The text above between the horizontal lines makes up about 550 words, so we can estimate something like 650 words as the limit. Compare the list of characters that made it over the serial line with the type specimen:

scan of the typeface -- it's quite nice

  • The text above was sent by hitting CODE+s then text. Note that nothing seems to happen, but tail -f on the file works well and shows it to be transferred. To empty the memory and prevent the content getting printed at an inconvenient time, the simplest thing to do is turn the machine off, then turn it on with the C key (red cancel key) held down; this returns it to factory settings, a bit of a nuclear option. It is not supposed to print what is sent to the computer, but it does, so maybe there’s a bug in mine, I don’t know, but this will do.

Over and out

Printing to the EP44 — doing it properly

I rigged up a dodgy way to print to the Brother EP44 using a simple three-wire cable. The problem with that is the printer cannot keep up with the serial port and the text starts to go funny.

Later, trying to play with it as a terminal device, I made a null modem cable and plugged a DE9 to DB25 adapter on it because the EP44 has a DB25 plug. I tried using that as a print cable, and because it has the full complement of wires for flow control, if I set the printer spooler to use XON/XOFF (software) flow control, I can print using lp without using a script that sends one line at a time — the printer can use the extra wires to signal to the computer to wait (buffer full).

screenshot showing the menu giving flow control options -- xon/xoff is software control
Using the CUPS interface at http://localhost:631 to set the options on the Brother EP-44 printer

The end result is that printing to the machine is very simple — if the full null modem cable is used. The 24-pin typeface is quite nice and very readable, and the only disadvantage really is the thin thermal paper (fax roll) that I have to use.

Printing from GUI applications does not work unless (like, say, nedit) they call lp to send the job. Using the CUPS browser interface to set up the printer works, but I have to use lp to send the job. Maybe I can figure it out, but it’s not really important.

The EP44 is a very portable printer. Works for ages off its batteries, or can even be run from the 5V output from a USB powerpack, if you don’t mind butchering a USB cable, as shown on YouTube.

It’s just a curiosity, but an impressive little one.

Here is setting it up using a hardware serial port, /dev/ttyS0.

  • Printer set to 1200 baud, 8 bit, no parity.
  • Open CUPS web interface
  • Add Printer
  • Serial Port #1
  • Set as in picture above
  • name it ep44
  • Make: Generic
  • Model: Generic Text-Only Printer (en)

Can set some defaults (TAB size, whether continuous or roll of paper, and so on). Don’t bother printing from the GUI, but open a command line, and…

$ lpstat -a
ep44 accepting requests since Mon 22 Feb 2021 17:22:12 AEDT
$ lp -d ep44 some-text-file.txt

Works a treat. Remember to set the printer so that line endings ar CR/LF, to absorb the unneeded line feed. Set it to typewriter codes to do underline and super/subscript using ESC codes. Otherwise, 7 or 8 bit. Need tor read the manual! (Can find it online with a web search.)

The future is 1984!

Time fixes the EP44

While I was monkeying around with my Brother EP44 — one funky old bit of hardware — I managed to send it some weird code that caused it to print really condensed characters and not respond to the return key… I was trying to use it as a serial printer, which worked on Windows via a USB to serial adapter and on Linux with a hardware serial port, but I could not get it to work on Linux via a USB adapter.

After I messed with it, whether I was typing or sending to it from the computer, the text looked like this:

Scan of bad text
Weird condensed text from my EP44 — not what I wanted to see…

And I thought maybe I’d bricked the thing. I tried turning it off and on again and suchlike, and there’s some kind of reset key combination too (turn it on with the red C key depressed), but that did not help. I took out the batteries for varying lengths of time and put them back in. No good.

As a last resort, I took the batteries out and left it in a cupboard for months, hoping that when it reinitialised it would be all right. Yes, I was hoping for some kind of magic to occur. And it did.

Here is the most recent typing test:

a scan of the printout -- looks great!
Character set from the EP44 — ‘a’ is used to demonstrate the range of accents available

So it’s alive! I should note that I scanned the type at 600 by 600 greyscale using xsane, then used ImageJ to threshold it. That makes it look very black. The original scan looks more like this:

The scan before thresholding

It would not look so bad if I used clean, flat paper! Also, the fax roll is so thin it should really be backed when scanning. The thresholded image gives a good idea of the glyph shapes and the wide range of choices. The accent characters can be put above any character you like — they print, but do not move the typehead, then the next character goes underneath.

K41693501
Serial number
The logo on the EP44

Yay.

 

Comparing typefaces

scan of type

 


Comments

The Super-Speed is lovely to type on, and the result is pretty good for a machine nearly 80 years old. Of all these machines, this is the one you’d put in a secluded office and use to write a great early 20th century  novel.

The 17 is pretty good given how rusty it was, but it’s a slow typer with some sticky keys.

The SG3 stands out as both very even and more modulated, and with very strongly lining figures. Almost as regular as the Selectric, which is so sharp and precise and dry. Apart from the Selectric, this is the one you’d use in the office at the firm.

The Dora is also nice and even, if dull; at present the capitals sit a little high, so some adjustment is needed, I suppose, though I doubt I’ll bother.

Hermes 10 (electric) is a little like the SG3 — some modulation, and more rounded serifs. Also, both happen to have quite dark ribbons, which makes a difference too.

The 3912C is pretty regular — but it is an electric, so the darkness ought to be uniform! Letters fade a little at the top, so either it’s not striking in the right place or the platen is just too hard. The 700T is very good for clarity and regularity, but the position of the caps isn’t matching the lower-case letters too well — could be my weight on the shift key, though, since the T and D seem okay, it’s just the B. Seems to be exactly the same selection of characters and typeface as the 3912C.

The AX-10 is a daisy wheel machine and this wheel has a slyly stylish font. The wheel says Prestige 1012. Locations of symbols ($, # etc) are more similar to a computer keyboard, as might be expected for a relatively new machine. A good machine for kids to type on — clean type and not too much key pressure needed.

The other Brother, the EP-44, is a very different beast. It is a thermal dot matrix printer with a keyboard. It cannot do carbons, but can work as a serial text-only printer. Being electronic, it has a second shift key that gives access to a wider range of characters — hence the third line. The typeface looks a bit like a monospace Times. Not bad though looks a bit pixelated on close inspection and descenders are basically false. Can also do underlines.

The cw-16 probably looks more pixelated then the EP, but gives a very wide range of characters and the options of bold, 10 or 12 pitch, double width (in each pitch) and underlined. This example is, like the EP-44 example, printed on thermal paper, and again the descenders are very shallow, almost false.

SM-8 is very niceely aligned, and only slightly understruck right at the tops of the ascenders. A very nice and quite portable machine.

The Clipper looks pretty good for a machine its age and with an older ribbon. Sharp, well-aligned and even, except for the fractions — and I think I hit those a bit hard… and maybe they need a clean, too.

 

The Brother EP44 as a serial terminal for DOS

This is so nerdy.

I made up a printer cable for my EP-44 – it is the ‘Common serial printer cable’ taken from this page. I don’t normally take images from the web, but since pages do sometimes vanish, this is the wiring diagram I followed:

DB-9 (actually DE-9) to DB-25 serial printer cable wiring diagram

And it works very well as a serial printer cable from Linux (using a hardware DE-9 port). In fact, it works very well from DOS. I installed FreeDOS on a partition on an old Compaq Armada E500; it has a hardware serial port (DE-9) so is very nice for monkeying around.

Plugged the EP-44 into the computer and turned both on. Hint: this won’t work if this step is omitted!

Photo
The EP-44 connected to the Armada by a home-made cable

Set the EP44 to 1200 baud, N parity, 8-bit data and used the DOS MODE command to set the port to the same.

C:\> mode com1:1200,n,8,1,b

And I could print by copying stuff to COM1. Can also try:

C:\> mode lpt1:=com1:

This assigns COM1 as the printer port. The problem is that the EP44 has a very small buffer (160 bytes, IIRC), so as once before, it is a good idea to send the file a line at a time, using a little script. Slowing the baud rate right down (the computer can go as low as 110) helps, but even 110 baud is still a lot faster than the typewriter can print.

Now, I recently found out that using a full null-modem cable (uses more than the 4 wires in the diagram above) as a printer cable works really well with Linux — it allows for XON/XOFF flow control and line-by-line printing is not needed. DOS is not able to make use of the same cable, for some reason (or at least I could not do it), but works well with the simpler cable. So the EP44 (with and without hyphen) acts as a battery-powered 24-pin (NLQ) thermal printer that can be transported around with your laptop. How very 1990s!

But it gets funkier. If you like that sort of thing.

DOS has a little-used command called ctty, ‘change tty’. It can be used to make DOS look somewhere other than the console (ie keyboard and screen) for input and output. I found that it works with the EP-44, though the baud rate has to be set right down or the EP44 keystrokes don’t get captured (most worked, but the Enter key was flaky at higher baud. Who knows?).

On the DOS PC typed:

C:\> mode com1:110,n,8,1,b
C:\> ctty com1

with the EP-44 set at 110 baud, 8-bit data, no parity.
This gave me this on the EP44 screen (and on the fax roll I was printing onto):

photo
DOS prompt on the EP-44 screen

I could then type commands on the EP44 and get the output on the printer (it also appeared, uselessly, on the 16-character screen), with the console (screen) on the computer looking frozen and the computer keyboard not taking input. Here is a scan of a brief DOS session, as it happened on the EP-44.

scan of printout
DOS session on paper

At the end, as you can see, I typed

C:\> ctty con

and control went back to the computer and its keyboard. As you can see, during the session I can get listings, create and view files, and move around the directory structure. I’m sure I could do lots more. Anything that uses graphics, or addresses the video RAM directly, or even addresses the screen out of order, won’t work. I read somewhere that a DOS Elvis version worked on a DOS serial terminal; how it would work with a paper roll, I don’t know. I guess you’d have to use EDLIN or something! When I tried to use FreeDOS’s edit to look at a file, the screen on the computer lit up. The EP-44 printed the console output that firing up the editor gives (see below), but the editor screen itself appeared on the computer screen and could be used on the computer via the computer keyboard. When I exited edit (using the computer keyboard), control passed back to the EP44.

It would be possible to use a normal DOS session to put the commands that initiate the serial session into autoexec.bat, such that the machine would boot into that state. Then you’d have headless DOS. Kind of.

scan of output
Running edit

I found that many but not all of the special characters (accents, pound sign, that sort of thing) that the EP44 could generate could be written to a file and would then show up when viewing the file on the computer.

scan of printout
Non-keyboard characters that worked

It depends on where they sit in the ASCII table, I guess.

You can backspace over a mistyped command or file name (like the word ‘symbol’ above), and fix it before sending it to the computer, but of course the typewriter has already printed your mistake, giving overwritten results.

The typewriter lets you choose between CR and CR+LF for line endings, so if you get too many empty lines, try adjusting that setting. DOS uses CR+LF, so if the typewriter is just expecting CR it will not eat the LF and you get double-spaced output.

photo
The scanned output as it came out of the typewriter

Of course, this is just a toy. I tried playing with agetty under Linux, but I could not get the same results, not with the simple cable nor the full null-modem cable. Probably some serial port settings are not right, but I ran out of enthusiasm when trying to sort it out.

Anyway, useless but nifty.