The EP-44 is a thermal printing typewriter from around 1984. It also comes with an RS-232c port and the documentation sys it can be used as a printer and terminal.
Here’s some stuff about escape sequences and formatting text when printing to the EP-44.
The EP-44 can be set to expect text encoding as ‘7BIT’, ‘8BIT’ and ‘T/W’. 7 and 8 bit correspond to ASCII codes and T/W is a slightly different code table that includes a couple of escape sequences for controlling the typewriter.
If we set the typewriter in T/W mode, we can make it do superscripts, subscripts and underlines by entering escape sequences into the string of text sent to the machine. One can enter escape sequences in Vim by going into insert mode and typing Ctrl+v then Esc. In the editor screen it should look like ^[ (but typing caret then square bracket won’t work!). Then type the key. ^[D scrolls to give superscript; scroll back down with ^[U; reverse the order to do subscript. ^[E turns underline on, ^[R turns it off.
Here is a screenshot of a text file in Vim:
Vim kindly syntax highlights the escape codes.
Here is the printout, printed by simply catting the file to /dev/ttyS1 (in this case):
So we can see that the escape codes do their job. Remember, this is with the typewriter in T/W mode; in 7BIT or 8BIT this does not work.
Quirks of T/W mode include: if you send a keyboard caret (^) it prints a raised 2 (like a squared). Left brace gives a one-quarter symbol, right brace gives pilcrow, back tick gives degree symbol, pipe gives one-half and tilde gives section mark. Actually, probably this is pretty useful.
So that’s T/W mode — ideal if super- and subscript and underline are important and the unaccented, first 128 ASCII characters are all you need. (Basically, the characters you can access using the keys with or without the shift key).
Also, for some reason ^[Y gives a plus/minus symbol.
8BIT mode gives access to (some of) the ASCII characters up to FF (number 256). But if we set the typewriter to 8BIT and send the text file shown above, we get this:
So the escape codes don’t work. But we do get access to some more characters.
I fired up bvi and made a file consisting of hex values from 20 (a space) up to FF, plus a little trick in the second half. Here’s what it looks like in bvi (I love that VGA font):
When we print this file, we get:
First, we can see that the caret etc are correctly interpreted. Though I cannot see a pilcrow anywhere! So what’s the code for that?
Second, we see that (as the EP-44 manual shows) we get access to a lot more characters. Most can be entered from the EP-44 keyboard, though not all (I can’t see guillemets on the EP-44 keyboard, but I guess they’re in the ROM somewhere since they’d be used on French versions, for example).
The line shown as: 0000…///###.##
Actually consists of four O, three backspace characters (hex value 08), three slashes, three hashes, one tab character and two hashes.
We can see that the backspaces work, and give us three slashed O. This means in 8BIT mode we can superimpose characters; for example we could put a hat (caret) on top of a variable, or a degree symbol for an accent (though accented A and a are available elsewhere).
The last bit of the file shows that this lets us overcome the lack of underline escape codes in 8BIT mode — we can backspace and then print an underscore character. I’ve done it character-by-character, but based on the clattering of the typewriter that this engendered, it might be better to write the whole phrase then backspace and do the underline all in one go.
This would also allow strike-through, using a series of hyphens, though of course they would not meet, so it would be a dashed line.
Since the 8BIT codes include a superscript 2, if we were only typing stuff with squares that would be the way to go!
I think the tab character worked, but I’m not sure since the gap is only about 1 character wide — but that could reflect the tab stop, I’m not sure.
Useful references for this were: http://www.asciitable.com/.
The 8BIT mode is preferable unless superscript and subscript are important. 7BIT was just like 8BIT but limited to the first 128 characters.
This is about using it to print from a DB9 serial port on the back of an old desktop computer. First needed cables; a serial printer cable as discussed here. I made one up from bits from Jaycar. Total cost — about $4.
So, first I used an older computer (i386) that actually has a DB9 serial port. I bought a male DB25 plug and a female DB9 from Jaycar and used some hook-up wire in the shed to solder up a cable.
I then plugged the cable into the computer and the printer.
Here is the story, typed up on the old computer and printed to the EP-44.
Printed using this command $ cat testfile.txt > /dev/ttyS0 Typewriter settings ------------------- Baud Rate: 1200 Bit Length: 8 Parity: N New Line: CR Code: 8bit Er: Y Printing out ttyS0 configuration information -------------------------------------------- $ 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; flush = ^O; min = 1; time = O; —parenb —parodd 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 n10 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok —echon1 ~noflsh -xcase -tostop -echoprt echoctl echoke This is printed out but saved for input back into stty (later I was to find that this did not work) --------------------------------------------------------------------------------------------------- $ stty —F /dev/ttyS0 --save 500:5:cb9:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 What I did was pretty simple ---------------------------- (1) Made up the cable as per the website. (2) Booted up the old computer (old Ubuntu) $ uname -r Linux computername 3.0.0-32-generic #51-Ubuntu SMP Thu Mar 21 15:51:26 UTC 2013 1686 i686 i386 GNU/Linux $ cat /etc/debian_version wheezy/sid (Seems to be Oneric something-or-other) (3) Made the tty agree with the typewriter: $ stty -F /dev/ttyS0 speed 1200 $ stty -F /dev/ttyS0 cs8 Note: I did all this as root.
Then catted the file to the device.
I did that as root, but regular user username can do it is I run:
$ sudo usermod -a -G dialout username
Output has empty lines in it — I think I should switch to CR + LF for the New Line setting (yes — fixed).
It is at least quite notionally possible to make up a script that would reformat a text file, add any appropriate codes, page the text sensibly, possibly including pauses or whatever, and send it to the printer. In fact, I have done this [[link to post]].
So … it works from an old-fashioned hardware serial port. Will it work using the USB converter? Then I’II have a battery-powered printer to carry with my netbook.
It would be nice if it could be accessed like a proper printer, through a print dialogue, for example, but I do not think that is critical, given the limited capabilities of the machine. (No sheet feeder (though could set it up to use a fax roll), no fonts, only the possibility of underline, not many characters per line, and so on.)
I would also like to develop a serial plug for the HP 200LX. A handmade rectangular plug with a short cord to a male DB9 (less than $2 at Jaycar) and no doubt I could print from the palmtop.
The type works well with OCR as long as the darkness is OK.
It would be able to cope with the output from dvi2tty if the column width is set correctly in dvi2tty.
To use it at a terminal I expect I’ll need a null modem cable but for now one thing at a time.
Here is part of the printout from the serial port to the EP-44, scanned. It can look better than this — this is thermally printed on a battered old fax roll that had creases and blotchy stains on it.
I followed up by trying to print from my AlphaServer, running Debian 5. It worked from COM2 (but not COM1), and all I had to do was set the baud rate.
I was also able to set it up to run through lp on the command line. Like this:
Open browser, go to localhost:631 (Cups web interface).
Administration: Add printer
Description: Print from the command line, send only ASCII text
Serial port #2 (/dev/ttyS1)
Serial Port Settings for EP-44
Baud Rate: 1200
Data Bits: 8
Flow Control: None
Model/Driver for EP-44
Raw Queue (en)
Note: Since this is my old AlphaServer, Cups version is 1.3.8.
This did not work for printing from gui, even from text editors like gedit — even though set to raw, gnome (gnome 2 in this case, since it is old Debian) still puts postscript wrappers around the files. Why, I don’t know. Could not be bothered chasing it up.
I tried printing from the terminal emulator. I found that no matter what New Line setting I put on the printer, I got that stepping down effect:
Where the text Does a line feed but not a newline at the end of each line of the text file.
but, if I used vim (or unix2dos) to make it a DOS file (:set ff=dos) then I could use
lp -d EP-44 filename.txt
in a terminal window and it worked!
Long files can be an issue — but see [[this post]].
I don’t know why setting New Line to CR or CR+LF did not help, but I found I had to make it a DOS file.
So now I can print using cat or lp, but not from a GUI.
See newer post for some more details on printing control.
Well, it was $5 so I bought it. I could tell that the drawband (which had already been replaced by fishing line) was not working. Based on the scratch marks on the drum that pulls it, someone had had a go at fixing it and the problem was more than just a broken band.
Also, the back trim was missing, though the case is intact. Still, $5, and I already have a very similar one so it gives me parts if nothing else.
On rotating the drum I found that it did not tighten up. OK, broken spring. I removed the screw that the drum end of the carriage pivots on and jacked up the end of the carriage enough to get the drum clear of the frame, then undid the slotted screw that holds the drum to the carriage and removed it. When I took the slotted screw out from the centre of the drum (by opening up the circlip), a little bit of broken spring fell out. That was why the drum was turning freely.
I poked the tip of a small flat-head screwdriver into the hole in the drum and was able to lift up the end of the spring and position it across the hole. At the same time, I swore a lot and tried to push the slotted bolt into the other side of the drum such that the edge of the spring went into the slot. After several tries, I got this to work (making sure I pushed the bolt in the right side so that the spring would turn the right way) and managed to push the bold right through and reattach the circlip. I could then reattach the drum to the carriage and reattach the carriage to the frame. There are now even more screwdriver scratches on the drum!
Then it was a matter of winding the spring until it was reasonably tight and reattaching the drawband to the little hook at the other end of the carriage. It seemed to work well enough, though I have not yet fully decided whether the spring is appropriately tight. Some comments on reattaching drawbands can be found here.
Sadly, that did not fix the typewriter. It needed a very thorough clean — many sticky keys, lots of gunk, some weird paint/glue stuff stuck to many of the keys. I think it must have been working hard and in a tough environment, and at the same time been oiled excessively; it may never be a very good typer. Pretty clearly the case took a big whack at some point, and if the machine was inside at the time it could have been knocked out of adjustment. Most useful bit of cleaning was using an old toothbrush to clean out the segment. It was pretty dirty.
Even then, I found that the ribbon was not lifted high enough and the caps and lower case letters did not strike in a row.
To deal with the ribbon, I flipped it over and took a look at the rod that drives the ribbon lifter. It’s this slightly S-shaped one. By extending or contracting the S, you can get a little bit of adjustment — the shorter it is, the higher the ribbon starts and finishes (this is a crude fix — it does not increase the lift, it just makes the ribbon start higher and then lift to a higher point). That worked pretty well.
Now, to adjust the UC/lc alignment, you adjust these little grub screw/lock nut combinations at the back left and right of the carriage. One pair governs where the carriage rests when Shift is not engaged, so positioning the lower case letters, the other governs how high it is lifted before it hits the stop when Shift is engaged, so positioning the upper case letters.
This is just a trial and error job, loosening off the lock nut, adjusting the grub screw, typing a few capitals (I use H because it is full height both lc and UC) typing a few lc then comparing.
Typewriters with small diameter platens can be a problem as the rubber hardens and the movement gets old. Ascenders of tall letters sometimes won’t hit the page hard enough, and that’s a problem here. The UC/lc adjustment screws can sometimes help with this, since if shifted together they can reposition to platen relative to where the typebars come down. But it’s pretty tricky. My concern with this machine is just that, given the condition it is in, it might just be bent out of shape. I can’t see a bend (and I have compared it to my working Aristocrat), but it would not need to be a big one. The case has taken a whack at some point…
Anyway, after all the adjustments and cleaning, the ‘W’ is still sticky, but I rolled a new sheet of paper into it and here is a type specimen.
And here from a non-bent example:
So my repairs so far have been, well, not brilliant, but perhaps this can be my typewriter for situations where the machine might take a bit of a knock. Looks like the top half of each letter is just not hitting the paper. More adjustments needed… I need to find a way to adjust it to make the ascenders hit the paper, and I need to clean the typeface.
The little lever that adjusts the line spacing was not working; it needed a little stickety-up bit (that there’s a teck-nick-all term) that lifts up the pawl that actually pulls on the cog that feeds the paper. In lifting the pawl, it causes the pawl to engage less and pull the paper through less. I tried using a blob of araldite to mimic the stickety-up bit. It was that or make a new piece entirely; I might have to do that, but the araldite worked. I used the slow setting kind and let it harden for a few hours then shaped it to suit and left it till the next day. Then I put just a tiny bit of graphite on it before assembly, just to make sure it did not stick.
I did not make up a proper trim for the back — I’ve juts used a bit of thin plastic that I could cut with scissors. Not very robust but meh.
The Brother EP-44 is a pretty funky little machine. It even won some kind of design award and got some pretty good reviews. Not only an NLQ dot matrix serial printer that can use ink or thermal paper, it can work as a typewriter, calculator and a serial terminal through an RS-232 port. Or so it would seem…
In some ways the EP-44 is the sweet spot of the EP family. Earlier ones, like EP-20 and EP-22, were 9-pin dot matrix and the print quality is pretty ordinary, which is to say awful. Later ones don’t have the serial port, since technology had passed that by as a thing anyone would want.
This one came in its box (though no packaging material) with some official Brother thermal and plain paper, a spare cassette (plus a mostly used one in it) and manuals in a couple of languages.
Only problem was, it didn’t work.
Batteries were OK.
Some corrosion in the battery bay, so opened it up and gave it a clean. Made sure around 6 volts were making it to the power switch. Still nothing. Checked the capacitors. They all looked fine. Wiggled some wires and it came to life when I prodded the black wire against the tag on the switch. Hmm. I think the switch is a bit dodgy. Maybe I’ll resolder some wires. For now, tap it a few times and it comes on.
Anyway, serial number is K41693501, which makes it look like a 1984 model.
I don’t have an AC transformer for it, but here is a picture (from the interweb) of the specs of a transformer for the EP-43, which I would guess would be the same. I know the EP-44 needs 6V:
Let’s see what we can do with it.
(1) Typewriter, ink on paper: Check.
As a typewriter, it’s not that great. The keyboard is like a big calculator (in fact, it has a built-in calculator), and as a typing machine, the Casiowriter is preferable. The Casiowriter has bold and double-width, and (as I recall) a dictionary. And bigger keys more like a real keyboard (though it is also rather bulkier).
(2) Typewriter, thermal paper/fax roll: Check. Here is a type sample. The descenders are very short — pretty much false (see ‘g’ or ‘ç’) but otherwise it’s quite a serviceable typeface:
That’s not too bad, really. Quite readable and much better than the 9-pin print quality of earlier EPs.
(3) Serial printer on serial port (thermal, using a fax roll): Check: Future post.
(4) Serial printer on USB port (thermal, using a fax roll): Future post.
(5) Serial terminal into my AlphaServer 1200 (again, fax roll): Future post.
A few comments on using the EP-44 as a typewriter.
- The keys do take some getting used to; the ‘feel’ is certainly odd. The keys feel far apart, and their movement is soft and short, rather like a calculator.
- The LCD screen looks very small, but it is actually very useful. Being able to see the most recent word or two before they get printed really lets you pick up most of your mistakes. When I write on the Brother, the copy has far fewer errors than on a manual.
- It is quite a nice piece of industrial design, but it does look more like lab equipment than a typewriter. It looks like the control panel of a mass spec or something.
- My one has some keys without English labels, so I’ll need to put some little stickers on it.
- The thermal print head lets it outlive the lack of ribbon cassettes. I don’t take on electric machines that need custom ribbons — thermal or conventional reels is the only way to go. Hence this, the cw-16 and the Hermes 10.
A Transatlantic Tunnel, Hurrah!
by Harry Harrison
NEL 1976, 192 pages.
Considered logically, this book has many flaws. Read closely, it shows a lot of proofreading errors, and at least one glaring copyediting error — the presence of ‘Brabbage‘ mechanical calculators, rather than ’Babbage’. Yet I think it’s a good book and happily recommend it.
Harrison posits that, through a single small event coming out differently, Spain remains Muslim in the 20th century. As a result, North America was not colonised by the Spanish. The English therefore gained a stronger toehold, with the result that it remains part of the empire, and indeed is not yet even independent.
Harrison lays out the consequences of the events clearly enough. For some reason Germany remains a confederation of minor states. The French are the great enemy, and George Washington, whose heir is the story’s protagonist, is a reviled traitor. Harrison seems to suggest that, because the aeroplane was invented in America and the steam train in Britain, the aeroplane is a large slow device but the train is a nuclear powered miracle. This of course does not hold up to the most cursory inspection. Wasn’t the nuclear reactor just as much an American invention as the aeroplane? And, if we consider the development of nuclear science as accelerated by WWII, would it exist in any form in an alternative world where Fermi and the like were not gathered in the US but scattered across Europe (because here they were not fleeing the Nazis — who do not exist). And Europe was not that far behind the Wright brothers in developing planes, and by 1910 most of the development was happening in Europe.
There are other, similarly unconvincing repercussions, but to pick at them misses the charm of the book. Yes, tunnelling thousands of miles across the Abyssal Plane is … unlikely to say the least. Yes, the stiff Victorian-ness of key characters seems unlikely — just because the empire persisted, does not mean it stood still. But Augustus Washington’s journey by giant lumbering gas-powered helicopter, his battles with the forces of sabotage, privilege and misunderstanding, the races against time, the rescues and cliff-hangers, these things make this a fun read. Perhaps not a scholarly one, even the author admits!
These days, we would consider the book as steampunk And it is. I can’t say I’ve read a lot of steampunk, so I hesitate to recommend this to the modern connoisseur; but it would certainly be worth a look. Harrison wrote a lot of pretty ordinary SF. While his work was popular and widely available, no one considers him as the genre at its most literary. The books he is most well known for are fast actioners like the Stainless Steel Rat books, and another parallel universe series, the West of Eden books, which are in many ways his most major achievement.
This book deserves to be ranked up there with his most highly regarded books. It is still mostly about fast action, but it places it in an interesting time and place. Though there are some pretty cardboard characters, Harrison does not play them false and maintains excellent control of tone. Harrison’ s grip on the required terminology and appropriate technology is solid and never takes you out of the story — as long as the preposterous tunnel of the title doesn’t bother you too much.
I believe this is also known by the inferior title Tunnel through the deeps. By either name, it’s what I would call ‘a good read‘. Perhaps find it in a different, more carefully edited edition, though. While Harrison’s prose and characters never jerked me out of the story, the errors certainly did!
It makes a good airport novel; read it while you fly over the Atlantic, and imagine spending half a day hurtling through an evacuated tunnel inside a sealed can towed by nuclear powered steam locomotive. It’s a glorious vision of a world that never was.
Tried Mercury 3.6 on 32-bit Debian and the -mesa option got it to work. On 64-bit Debian (9.4), no such luck.
Eventually, tried the Windows version installed through wine. Note that I am running 64-bit Debian but wine is providing 32-bit Windows.
$ echo $WINEARCH win32 $ wine mercurystandalone-3.6-windows-installer.exe
ran winecfg; added the installer to the list of applications and set it to run as Windows 7.
Then installer ran, but barfed.
Something about “ntlm_auth version”.
Search for “ntlm_auth” at https://www.debian.org/distrib/packages. Is it even installed? Well, can make sure easily enough.
sudo apt-get install winbind libnss-winbind libpam-winbind
Tried again with wine set to mimic (“wine is not an emulator”) Windows 10. Nope. OK, Win 7.
ntlm_auth error was now gone but got another complaint.
But Mercury did launch. Guess I’ll use it till I have a problem …
I call them en rules, but I’m out-voted on that one.
Anyway, in line with one commenter on this post, I’ll point out how it can be done.
If you are in Word and type ’15–34′, the ’34’ can end up on the next line – the en dash is breaking. But, Word does the breaking after the en dash.
Type ’15– 34′ where the gap after the dash is a nonbreaking space (Ctrl-Shift-Space in Windows, something else in Mac) and then select the nonbreaking space and type Ctrl-D (or go to the Font menu from the Home ribbon). Go to Advanced, then select the Scale drop-down menu and type something like 1%. It does not accept 0%, but a space 1% of the width of a normal one is close enough to invisible. The nonbreaking space after the en dash does not break on either side, so fixes the problem.
Option 2 (the better one, as suggested by Daniel)
After typing/inserting the en dash, go to Insert and then Symbols and select Special Characters and choose No-Width Non Break. If you need it regularly you can assign a shortcut to it.
They sure like capitalising everything! No-Width Non Break.
Sorry, just trying a clickbait heading.
Actually, there is one thing.
On Windows 10:
Go to: PC Settings → Search for ‘performance’ in the ‘Find a setting’ box → Select ‘Adjust the appearance and performance of Windows’ → Select ‘Adjust for best performance’.
On Windows 7:
Go to: Control Panel → View by: Small icons → Performance Information and Tools → Adjust visual effects → Adjust for best performance.
I mean, why would you not want best performance?
Plus this gives it a less cartoony look — it looks like the machine means business.
Oh, and don’t forget to stick a label or some non-transparent tape over your webcam.
Not that I’m paranoid.
I want to mount a samba share on a Linux box. And I don’t really know what I am doing. Here’s what I did do. First, installed the VPN software and started the VPN.
$ sudo apt-get install openvpn resolvconf $ sudo openvpn --config openvpn_config_file.ovpn
The file ‘openvpn_config_file.ovpn’ was provided by my IT support people and includes keys and configuration information.
Then tested it on command line:
$ smbclient \\\\server\\service_on_server -U username_on_server
This needs explanation.
‘username_on_server’ is just that — my username on the server I am logging in to, not on the local machine. The -U option just tells it who I am so it will then prompt me for the password I use to log into the server.
The four backslashes? On the Linux command line, you need to enter a backslash as an escaped character. And the escape character is a backslash, so ‘\\’ gives you a single backslash. The above command on Windows would look like the next example, because you don’t need to escape the backslashes. This might look a bit more familiar if you’ve mapped a network drive on Windows:
C:\> smbclient \\server\service_on_server -U username_on_server
I’m gong to limit myself to basic file transfer, so ‘service_on_server’ is often just another way of saying a folder. For example, if you share a folder called ‘group’ with your collaborators, that might be the service name. The service name does not have to be the folder name and you might need to find out from IT support what needs to be typed here.
‘server’ is often the computer. Again, it may not be, but for my purposes it is. When I run the VPN, it allocates IP addresses to the computers/servers on the inside of the VP network, and I use that as the server ID, so the command might look like:
$ smbclient \\\\123.456.78.9\\folder_on_server -U username_on_server
Anyway, once you log in, you can type ‘help’ to get a list of commands:
$ smbclient \\\\123.456.78.9\\groups -U username WARNING: The "syslog" option is deprecated Enter username's password: Domain=[DomainName] OS=[Windows Server OS Version] Server=[Windows Server Version] smb: \> help ? allinfo altname archive backup blocksize cancel case_sensitive cd chmod chown close del dir du echo exit get getfacl geteas hardlink help history iosize lcd link lock lowercase ls l mask md mget mkdir more mput newer notify open posix posix_encrypt posix_open posix_mkdir posix_rmdir posix_unlink posix_whoami print prompt put pwd q queue quit readlink rd recurse reget rename reput rm rmdir showacls setea setmode scopy stat symlink tar tarmode timeout translate unlock volume vuid wdel logon listconnect showconnect tcon tdis tid logoff .. ! smb: \>
If you have ever used ftp or sftp or any of their variants, it is much the same. You can cd around inside the server, lcd to change directories on the local machine, and get and put files. Those are the main commands.
OK, that works. There’s our ‘minimal viable product’. But what about GUIs? People like GUIs, so let’s try one more thing. There’s a GUI front end for samba called smb4k. It’s not the only one, but it’s the one I’m running with.
$ sudo apt-get install smb4k khelpcenter $ smb4k
(I ran this with the VPN software already running in the background.)
Clicked ‘Open Mount Dialog’ button (or Ctrl+o or Network → Open Mount Dialog).
Entered the information like this, and checked bookmark’:
It then asked about using the KDE wallet and GPG. I chose ‘classic blowfish’ and created a password.
It then asked for that same password and a login dialogue to log in to the server came up. Here I put the server password and …
Clicked on the item in the list of mounted shares and it opened in my default file manager, so now I have a GUI to browse the networked drive.
So there we have it. From ignorance to browsing a samba network drive using caja or whatever in not that long.