Archive | hardware RSS for this section

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.


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 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,./
+ []{}<> $ \ ;’ #| &!@ *
OK, that’s done. Now we have 719 remaining.


  • 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

Page sizes on Seiko SII SLP label printer

The CUPS driver is very useful, but the media selection menu in CUPS does not give the paper size, just the label code, so I thought a table giving the description, the label code and the dimensions in a couple of units might be handy. It’s really for my own reference.

First, find siislp200.ppd and look through it for the relevant text.

grep PageSize siislp200.ppd | grep SLP > sizes.txt

This gives all the lines that set page sizes. The sizes are in points.

Neaten up the output using cut; this pulls out the label size names:

$ cut -d'*' -f2 sizes.txt | cut -d' ' -f2- | cut -d':' -f1 > list-of-labels.txt

This pulls out the sizes (in points)

$ cut -d'[' -f2 sizes.txt | cut -d']' -f1 | cut -d' ' -f1 > size-in-pointsx.txt
$ cut -d'[' -f2 sizes.txt | cut -d']' -f1 | cut -d' ' -f2 > size-in-pointsy.txt

(-d'x' sets x as the delimiter, and -fn takes the nth field defined by these delimiters. I separate x and y dimensions so that paste below will put a tab in between instead the the space that is already there, so when I import into LibreOffice Calc I can set tab as the delimiter.)

Then (I have to do things one step at a time, sorry)

$ paste list-of-labels.txt size-in-pointsx.txt size-in-pointsy.txt > labels-and-sizes.txt

Then opened that list in Libreoffice Calc and calculated the sizes in mm and inches as well as points. (Also decided to separate the label code from the description). Pasted into Writer, formatted the table and exported as HTML, and pasted here.

Note: x = length along label roll, y = width of roll.



x (pts)

y (pts)

x (mm)

y (mm)

x (in)

y (in)

8mmSpine/8mm Spine








35mmSlide/35mm Slide








AddressLarge/Address – Large








AddressSmall/Address – Small
















EuroFolderNarrow/Euro Folder – Narrow








EuroFolderWide/Euro Folder – Wide








EuroNameBadge/Euro Name Badge








FileFolder/File Folder
















MediaBadge/Media Badge








































VHSFace/VHS Face








VHSSpine/VHS Spine








ZipDisk/Zip Disk








CutHanging13/1/3 cut hanging file folder








CutHanging15/1/5 cut hanging file folder








EuroFileFolder/European File folder








RetailLabel/Retail Label








EuroNameBadgeLarge/Euro Name Badge Large








TopCoatedPaper/Topcoated Paper is 150 mm length








4PartLabel/4-Part Label









Resurrect a HDD: fsck is a champ

After getting the data off using testdisk [[post]], I wanted to see if the drive was reusable. I plugged the USB hard drive into my Debian gnu/Linux box and used gparted to wipe and reformat (gpt partition table, ext4 file system), but it would not mount.

Tried processing it using fsck. Partition in question is /dev/sdg1

$ sudo mke2fs -n /dev/sdg
mke2fs 1.43.4 (31-Jan-2017)
Found a gpt partition table in /dev/sdg
Proceed anyway? (y,N) y
Creating filesystem with 488378646 4k blocks and 122101760 inodes
Filesystem UUID: 202d9436-fc78-4c87-b3fb-773acd10efab
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

OK, try to restore from one the the superblock backups.

$ sudo e2fsck -b 32768 /dev/sdg1

Lots of complaints about timestamps and garbage. Since I’ve already got all the files off it and I’m dealing with a clean drive, hit ‘a’ for ‘all’ to queries

It goes for a bit, then the file system check aborts before finishing the job:

Inode 1053105 passes checks, but checksum does not match inode. Fix? yes
Inode 1053107 passes checks, but checksum does not match inode. Fix? yes
Inode 1053108 seems to contain garbage. Clear? yes
Inode 1053109 seems to contain garbage. Clear? yes
Inode 1053110 seems to contain garbage. Clear? yes
e2fsck: aborted

SamsungAgain: ***** FILE SYSTEM WAS MODIFIED *****

Run it again.

The problematic inodes start later in each run, so it does seem to be fixing some of them, then barfing. Note: df -i give the number of inodes in total.

I ran it over and over again until it completed the whole drive, adding the -y flag. I used a script to run it repeatedly and went out for the day.

$cat fsck-script

for i in {1..2000}
  sudo e2fsck -yb 32768 /dev/sdg1 2> /dev/null | tail -10 | grep inode | tail -1

(Thus just looks through the last 10 lines of screen output for mention of an inode, then prints the last occurrence, so I can see what inode number we’re up to. I redirect error stream to null so it does not clutter anything up.) Output looks like this:

Inode 1838533 passes checks, but checksum does not match inode. Fix? yes
Inode 1855561 passes checks, but checksum does not match inode. Fix? yes
Inode 1867274 passes checks, but checksum does not match inode. Fix? yes
Inode 1869523 passes checks, but checksum does not match inode. Fix? yes
Inode 1895923 passes checks, but checksum does not match inode. Fix? yes
Special (device/socket/fifo) inode 1926002 has non-zero size. Fix? yes
Inode 1939589 passes checks, but checksum does not match inode. Fix? yes

Eventually (hours later), it’s done the whole disk. But is the disk any use?

Unplug and replug and it mounts OK, but do I trust it?

Look at it again:

$ sudo umount /dev/sdg1
$ sudo e2fsck -ycvb 32768 /dev/sdg1

Probably should have just done that first.

Then it goes to:

Checking for bad blocks (read-only test): 0.07% done, 0:38 elapsed. (0/0/0 errors)

And so on. Takes forever, but looks good. Eventually, it is done and the drive mounts readily on various machines. Seems OK, but I don’t think I’ll use it for mission-critical data ever again.



Recover files off a failed back-up disk, or ‘testdisk is awesome’

My backup USB (Samsung StoryStation) disk failed. Everything on it was either somewhere else or not required, but it was still annoying.

After first using rsync to back my home directory up to a new USB HDD, I decided to use testdisk to see what I could see on the old one. This was the error is was giving:

screen shot of error message

Error message

I tried mounting it on other computers, it would not. I put a different HDD in the enclosure and that did mount, so it was not the enclosure electronics failing. I tried to mount the disk using a different enclosure. Nope. Windows did not see it either.

Put it back in it’s original enclosure and plugged it in. As usual, the volume name showed up in the file manager (caja; I use MATE) but it threw the error.


(1) Check free space on new backup drive, then detach it (I don’t want to do anything to it by mistake)

(2) Attach the Samsung

(3) Watch it fail to mount

(4) Open terminal

(5) $ sudo testdisk

(6) Create a new log

(7) Select sdg

(8) Select Intel partition

(9) Select Analyse:

Disk /dev/sdg - 2000 GB / 1863 GiB - CHS 243201 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

 1 * HPFS - NTFS              0   1  2 243200 254 63 3907024001

Bad relative sector.

(10) Quick search

(11) Write partition structure to disk — OK

(12) Quit; told me to reboot, but it is a USB disk not THE disk, so did not — was that a mistake?

(13) Click on SAMSUNG in caja

(14) No luck

(15) Decide to grab the files and write them to my other backup disk.

(16) Plug in second USB HDD

(17) It mounts as sdh — do not mess with this or with main HDD in testdisk!

(18) $ sudo testdisk

(19) Append to log

(20) Select sdg

(21) Select Intel partition

(22) Go to Advanced

(23) Choose HPFS/NTFS

(24) Disk contents shows up — or do they? Seems to be showing the contents of my desktop HDD, not the USB one…?

(25) I am stupid and need to read menus better. Anyway …

(26) Got to this screen:

The following partition can't be recovered:
     Partition               Start        End    Size in sectors
>  HPFS - NTFS          243200 254 63 486401 253 61 3907024001

(27) Down the botttom, the menu says:

Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,

(28) Press ‘P’, and I can see the files!

(29) Now:

: to select the current file

So go through selecting.

(30) Then press ‘C’ (upper case!) then select the ‘where to’ directory (other USB HDD) and then ‘C’ again and wait.

TestDisk 7.0, Data Recovery Utility, April 2015

Please select a destination where the marked files will be copied.
Keys: Arrow keys to select another directory
      C when the destination is correct
Copying, please wait... 136 ok, 0 failed
Directory /media/username/COWLEY/Recovered-from-Samsung
>drwxrwxrwx  1000  1000         0  3-Apr-2019 16:31 .
 drwxrwxrwx  1000  1000      4096  3-Apr-2019 16:32 ..

(30) Successfully grabs thousands of files … testdisk is awesome.

(31) Only then did I do the Windows chkdsk thing suggested by the mount error shown above — I don’t trust chkdsk /f, a long-held fear from my experiences in the previous century.

(32) Booted up a Windows 7 VirtualBox instance, used the Devices menu to pass the broken USB HDD through to the machine … it did not show up. Try is on a bare metal Windows install … Device Manager says it is working properly, but it does not show up in the File Manager … ? Disk Manager shows it as unallocated space. OK, so Windows cannot see a file system.

(33) Go back to Linux box and just repartition and format the drive using gparted.

screen shot

Gparted in action

(34) Partition > New > NTFS (So I can use it on Windows). Give it a name and a label. Exit gparted and unplug the USB HDD, then plug it back in again. And there it is, all ready to go. Not sure I should trust it… and indeed, it’s proved flaky since. But I did get the files off!

Anyway, testdisk is awesome. It can save you time and money.


time and money

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

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.


The future is 1984!

Wire colours on Microsoft serial mouse cable

Note to self (could not possibly be of interest to anybody else; I’m just looking to repurpose the cable and every time I make these notes I lose them, so I’m putting them here.)

Wire colours in Microsoft serial mouse, something like this one.

Wire colours and pins are: 1 = green, 2 = brown, 3 = red, 4 = orange, 5 = black, 6 = not connected, 7 = yellow, 8 = white and 9 = blue; the sheath on the plug is connected to the sheath thta runs all along the cable.

Female serial (DE9) plug from a Microsoft serial mouse.

Hole 6 is not connected to anything, which is a bugger because pin 6 is used in several useful cables.



AlphaSmart 2000 — preventing accidental power on

Okay — modifying the AlphaSmart 2000 with a stick and some tape. I say ‘modifying’ because I don’t like the word hacking. It’s kind of pseudocool. I think the phrase ‘lifehack’ should be hacked to death.

But anyway. There is one massive design flaw of the 2000, at least when it is being used as a portable device chucked carelessly into a backpack. It’s old now and uses a PS/2 cable to type the text into a computer — which is fine, plenty of machines have PS/2 ports still, and PS/2-to-USB adapters are cheap. It’s in that nice zone where it’s useful but kind of worth little (at most $20 on ebay). So they are perfect for taking places you might hesitate to take a nice machine. Problem is, the on/off key is exposed (it’s just another keyboard key, at the top-left where Esc would usually be) and gets pushed and jabbed by other items in the bag and the thing turns on and off over and over again and you end up with a string of nonsense (or just one character over and over again), and since it is an older AlphaSmart, you have to delete the unwanted characters one by one using backspace (it calls it delete, but it is really backspace — the thing has got some kind of Mac’s disease; symptoms include a curly command key, ⌘, and a company address in Cupertino). That is clearly a pain. The newer ones (sorry, the ‘newer’ ones) — like the Neo — have a two-button-on option, whereby they won’t turn on unless you hold down Enter then on/off.

No such option on the 2000, so for the 2000 the simplest answer is to use a bit of tape and attach a Paddle Pop/Icy Pole/iced lolly/popsicle/icy pop (choose your local term, sorry if I’ve left it out) stick over most of the button, leaving just enough poking out to turn it on and off.  Version 1 used Sellotape (ie sticky tape). Version 2 stuck some blue insulation tape over the stick so you can’t tell it’s a stick. Now that’s technological advancement!

photo showing the stick taped over the top-left corner of the keyboard, where the power button is

Tape and wood works a treat

Works a treat. Now the old thing can go in my bag and only turn on when I want it to, not when it gets bumped. It’s so light and easy to carry, has space for 8 files and batteries last months — recommended for typing and hiking, typing and biking, that kind of thing.

Thank you and goodbye.

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.


Serial number

The logo on the EP44



Seiko SLP 200 on Debian gnu/Linux, including repurposing a power supply

Thermal label printer with serial and USB ports.

a photo of the orinter

The unit, with a bit of fax paper in it (hence the curl)

This one had no power supply, but the back plate said 6V 9W, with the centre pin negative. I note this because if you look for an AC supply anywhere on the web, they grey out the details, I guess to try to force you to buy a new one from them. Anyway, I had a 7V one in the shed and kludged together a plug that fit. Seemed to work. Held down the paper feed button, pressed and released the power button (still holding other one down) and a label came out (then I let go of all buttons):

scan of label

Test label from Seiko SLP 200 thermal label printer

Next steps are to get some ammunition (only had a couple of labels) and install it properly. Till then, I cut a strip of fax roll to the right width and put it in. It does not have the black marks on the back that the machine uses to position the labels, but it might be OK for testing the installation (it is).

Plug in the USB cable.

No drivers are available, says computer!


No drivers warnings

Clicking on the dialogue boxes that come up, I get a window that asks me for a ppd file. How about this one:

There is a file in that archive called siislp200.ppd. Sounds good.

Went to localhost:631 in the browser.

But the printer does not work. The zip file noted above has some instructions in it for compiling some stuff. A ppd file calls on tools to interpret the thing you want to print, and they are not already on the computer for this printer, so just a ppd is not enough. Had another look at the archive … here is an extract from the README.txt:

CUPS libraries:

Building this driver requires that CUPS development libraries are installed. These libraries can be found within your Linux implementation’s software installer.

Ubuntu: libcupsys2-dev and libcupsimage2-dev
Others: cups-devel and cups-libs

Other libraries:

(-ljpeg) libjpeg can be downloaded and built from
(-lz) libz can be downloaded and built from

.tar.gz files can be unpacked with tar -vxfz .
.tar files can be unpacked with tar -vxf .

Configure with ./configure.

Copy the resulting libraries (usually .a suffix) to a directory accessible to your linker, usually /usr/lib.

From the command-line, utter the following:

sudo make build

After a successful build, the driver may be installed with:

sudo make install

The driver may be uninstalled with:

sudo make uninstall

This will not remove printer instances recognized by the system.

Now, there is no configure script in the archive. But there is a makefile … but it does not work (on my Debian 9.X box — probably works elsewhere, based on the documentation).

(Notes: libcupsys2-dev is not part of Debian as far as I can tell, but libcups2-dev is, and that has the same files. libcupsimage2-dev is in Debian.)

OK, I’m going to try this one — derived from the above archive, but modified, and best of all it says something about fixing a problem with Debian:

sudo make build
sudo make install

Yay! Warnings but no errors.

Now, off to localhost:631 to see what I can see… hopefully, the requisite files are now part of the CUPS database of ppd files, with all associated libraries and whatnot available too.

Administration →
Add Printer →
The SLP shows up in the list of local printers — SII SLP200 (SII SLP200)

Screen shot showing the list of printers

Add printer dialogue box

Select it and continue →
Continue →
Select the model →
Add Printer →
Choose media size — I went for ‘large address’ for now (yes, screen capture says ‘small’):

Screen shot of menu

Choose media

Test page printed OK! (Apologies for the grotty paper.)

scan of test page -- no readable text anyway!

CUPS test page on the SLP 200

So did a text file from the command line:

$ fmt -w 20 texttest.txt > new

$ lp -d SII_SLP200 new

(fmt just takes the file and formats it; in this case, as a 20 character wide column.)

scan of printout, says

The SLP 200 as a text printer — about 20 characters wide; real printout is about 50mm across

Also printed a bitmap:

$ lp -d SII_SLP200 ~/Pictures/Monkey_BvdOclKCYAAlQF5.png
scan of printout of the monkey toy

It’s a monkey!

For reference, here is the original monkey:

photo of a plush monkey

The original monkey image

The print spooler throws me an error saying there’s a missing file or something, but the printer works fine, although it does seem to skip the last few lines of pixels for some files and truncate them, clipping the bottom edges of the last row of text, for example, so all the letters have flat bottoms. If sending text it is best to add a couple of lines of non-printing characters to the end of the file and then a single character that will print to make sure the last printing characters come out; for example, when printing from LibreOffice, I turned a row of redundant characters white and then added a black square. It’s less apparent with images.

Scan of printout.

Printed from LibreOffice after setting paper to be 48mm on a side; a black rectangle 2 lines below the printed text did not print

The driver works printing from some GUI applications (LibreOffice, mtpaint, but not kolorpaint, for example), but in general works better using lp on the command line (works for png, tiff, gif, bmp, jpg, (e)ps, pdf [must have correct media size embedded in the file], txt, ppm). Drawings done in xFig and exported with the size set to 5 cm wide then printed using lp worked well, as did files drawn to be 5 cm wide and printed from xFig.

Some useful resources


Apparent Linux driver: and

(This one did not compile on Debian but may work on some other systems.)

See also: (may be the same as above, probably works for Ubuntu and some others) (did compile on Debian)

Hardware FAQ:

Print like it’s 1985

Printing from HP 200LX palmtop

The HP 200LX has a serial port on the side. It’s little and rectangular, but pretty standard apart from that. Since I have acquired an appropriately vintage serial printer, I thought I’d give printing from the LX a try.

It turns out to be remarkably simple once the hardware is in place.

The printer has a female DB25 plug on it. I had an old serial line that had a male DB9 (DE9) on one end and a female DB25 on the other, but I also have an adapter that will make a male DB9 into a male DB25. Thus, it seemed to me I could put a rectangular plug on the end of the cable attached to the male DB9, then convert that to DB25 and plug it into the printer.

The first way I tried to get a plug that would fit the 200LX serial port was using a 5 x 2 section of IDE ribbon connector — but the pin spacing is too big by a factor ot 5/4 (4 pins fit in the space where 5 need to go). Purely by chance, I found a broken Conner CP2121 hard drive, and you can see that on the PCB there are some pins and on them is a sort of socket plug thingy (see, I know all the technical terms). Since the drive was cactus, I pulled this off, filed it down to be 5 x 2 and found that it fitted perfectly!

Photo of dismantled hard drive

The Conner HDD opened up — yellow arrow shows the pins in question

photo showing the white plastic plug

The case of the Conner HDD with the plug, after it was removed from the pins shown in the previous picture and filed down to size

Soldering the wires on was tricky, but since I was making a 3 wire null modem (see this page), I did not need to deal with all of them. I decided to solder them all because I might want to make up a full handshaking cable at some time, but I could not use them all because the DE9 was missing some wires. I think it was a commercial ‘dumb’ null modem cable or something. Checked for continuity and crosstalk frequently.


photo of the plug, held in pliersphoto of the plug, held in pliers

Soldering the wires onto the back of the plug

I then used a multimeter to check which wire went with what pin on the DB9 plug, and soldered the two halves together to get my LX null modem cable. The main challenge is really anchoring the wires such that you don’t break the connections when pulling out the plug (my main tactic — very subtle —  is to use lots of tape). The other trick is that a rectangular plug can be put in upside down. The LX socket has a rebate in the top edge to prevent this, so I glued and taped a waste bit of wire insulation to the appropriate side of the plug so it would only go in one way. The other trick is to remember that the pin numbering you see on the LX has to be mirrored (right to left become left to right) when numbering the wires on the plug.

Here is a picture of the final cable — hardly a professional job, but I could confirm using a multimeter that the three wires I needed (2-3, 3-2 and 5-5) were unbroken, and that there was no crosstalk between wires. Ready to go!

photo, showing lots of tape

The final cable — hardly tidy

I set the printer to 300 baud (it is very old), 8 data bits, no parity.

I used the Setup menu on the LX to turn on the COM1 port (to save batteries, I keep this turned off whenever I am not actually using it) and to configure the printer. The old printer is plain text, so Epson FX-80 is the most suitable of the three printers built into the LX; chose 300 baud.

Saved all the changes and exited Setup.

Opened Memo, opened a memo and sent it to the printer. No worries! Almost … the printer is really a typewriter, and it prints slowly and has only 160 bytes (not KB, B) of a print buffer, so even at 300 baud the characters are soon coming too fast for it. It can only print small files, or bits of a file. But I can print from:

  • Lotus 123
  • Memo
  • Appointment
  • And probably other things if I could be  bothered.

What about printing from the command line?

Opened the DOS prompt and typed:

a:\> mode com1:300,n,1,8,b

Now, it is tempting to then use mode to redirect the printer (lpt1:) to the COM1 port, but Setup has already done this, so now I just need to go:

a:\> copy file.txt lpt1:

the serctl program that comes with the LX can turn the serial port on or off, wired or infrared, from the command line.

So there it is, the LX can print to the EP44. There was one other thing to try. The LX comes with a terminal program, and the EP44 can store 2 pages of text in its own memory, Can the EP44 text be dumped into the LX?


If I run the terminal program, set the baud rate to match the typewriter, and then start capturing the session (but without echoing local commands to the file!) then I can hit ‘Text’ on the typewriter and the contents of its memory will appear on the screen of the LX and then in the capture file.

Thus, the battery-powered HP 200LX can be paired with the battery-powered (but much larger) EP-44 in some weird kind of 1990s mobile office situation.

Who cares?

Serial port pinout

[1 2 3 4 5 ]
[6 7 8 9 10]

1 – DcD
2 – Rx
3 – Tx
4 – DTR
5 – GND
6 – DSR
7 – RtS
8 – CtS
9 – RI
10 – Shield ground