RP-300 receipt printer on Linux

I recently came into possession of a RP-300 receipt printer. Read: I found it in the electronics trash. It is a nice and sturdy piece of kit, that seems intended for point of sale (POS) systems.

If you go to the manufacturers website for that device, you’ll only find a Windows driver download. If you go to their European website for the follow-up product and its downloads section, then you’ll find a tarball for Linux.

I first hooked up the device and looked at dmesg what happened. Turns out the printer shows up as a regular USB printer and Linux loads the usblp kernel module. The obvious thing to try for me was then to just:

$ echo test > /dev/usb/lp0

Bingo, the printer immediately buzzed and fed the tape by one line. Nice instant gratification.

By looking at the self-test output (turn on with feed button pressed) and the documentation I figured out that it used a simple Epson emulation mode. Great, that used to be pretty much the standard for printers. So there is probably quite some fun to have by just using the standard control codes, plus those additional ones documented in the manual. Like operating the paper knife.

But I wanted to give that Linux package of theirs a shot. The tarball contains some PPD files, actually with the model number of my printer and a later model, so perfect. On the other hand it came with a random elf binary rastertoptc, which was compiled on some Suse9.3 system. It also came with some slightly weird looking script to install the files. I elected to read the script and do things manually to be on the safe side.

So first I had a look at that filter binary. Turns out it’s not a static binary, but dynamic. Luckily the only thing missing was libcupsimage2 (in the i386 variety, I had the 64bit version already) After putting the PPD and the filter in place, then restarting CUPS, I was able to add the printer (showed up as “unknown” in the local section). It was surprisingly painless. I created some 8cm wide and 30cm long document in Libreoffice Writer and after selecting the predefined 80x297mm paper, pressed print. The printer whizzed and started making bzzzz, bzzzz, bzzzz noises and after a few seconds I had my first print. It even cut it off nicely.

I’m not entirely sure if that filter is needed and if it couldn’t be replaced by a modified Epson filter. Anyway, I’m a happy camper. Now I just need to find some actual use for it. Maybe it’s going to be for shopping lists in combination with my laser bar code scanner. I can also see that it could be useful for some of our Devaamo events.

Tagged on: , , ,