Jonah Brüchert's Rust-Powered Typewriter Bridges Vintage East German Hardware to Modern Linux

Built in the German Democratic Republic, this electric typewriter now boasts print and keyboard input over USB.

ghalfacree
over 2 years ago Retro Tech

Jonah Brüchert has put together a keyboard with a difference: it's a vintage electric typewriter, built in the German Democratic Republic (GDR) — and now capable of interfacing with modern systems.

"This is about a SIGMA SM 8200i typewriter, which my parents gave to me for entertainment purposes when I was a child," Brüchert writes. "Now that I'm older, the entertainment has shifted more towards the technical internals. When we talked about teletype technology at my local university hackerspace, Spline, I remembered the typewriter had a 26-pin connector."

This vintage East German typewriter has a new life, courtesy a USB-to-serial adapter and some Rust hackery. (📹: Jonah Brüchert )

Some further research revealed the device to be a clone of the Erika S3004, "one of the most popular typewriters of the GDR," packaged in a different housing. Using documentation written for the original Erika, Brüchert was able to find a list of control commands — and to figure out that the 26-pin port includes a serial connection readily accessible to a USB adapter with some "creative wiring."

Interfacing the device with a modern computer, though, proved to be a challenge. "The commands that can be sent and received over the serial interface can be separated into two groups," Brüchert explains. "Control codes and character codes. Unfortunately the typewriter does not support Unicode … or ASCII."

To get around that problem, Brüchert converted a Python program written by members of the Chaostreff Potsdam hackspace into Rust. "The new gdrascii_codec crate exposes mostly const API," he explains, "which allows to write strings in Unicode in the source code for readability, but already translating them into gdrascii at compile time."

The typewriter can also be used as a keyboard input, with a little translation from character codes to keypresses. (📹: Jonah Brüchert )

At that point, the typewriter was a functional printer — but Brüchert wanted bidirectional functionality. "The typewriter supports a mode in which it sends keyboard input over the serial connection instead of printing it," he writes. "This was quite easily possible using the Linux kernel uinput API. The only complication was, that the typewriter already sends ready made character codes, but the Linux kernel expects to receive raw keypresses."

The finished code, for both printing and keyboard input, has been published to Codeberg under the European Union Public License v1.2; additional details are available on Brüchert's website.

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles