The STAR SP500 dot matrix printers themselves are lovely and reliable.
But finding their English documentation is very disorganized and hopeless. So here's everything you need to know, so you don't have to go searching.
For a STAR SP500 dot matrix and potentially other similar STAR receipt printers, when connected with a parallel to USB cable, and when module/driver is not running/installed, to use from the command line it is as simple as:
sudo chown you:you /dev/usb/lp0
echo -e "SOME SAMPLE TEXT\n\n" > /dev/usb/lp0
echo -e "\x1b\x4d MORE SAMPLE TEXT" > /dev/usb/lp0
The last line includes an 'escape sequence' code to change the font to a much more stylish retro/pixel one than the default. The above commands were tested and working on a fresh Linux liveUSB - no configuration required ! Thank f***. It uses the firmware pre-installed on the printer to convert text or escape sequences to formatted text.
All the other escape sequences - such as for bold, highlighted, or larger text and other bits - can be found in the 'control codes' chapter of the manual of a slightly different model, here: http://www.starmicronics.com/support/mannualfolder/sp300pm.pdf
Note: installing a cups
driver and using the printer through lpr
or any GUI based program seems to delete the device file at /dev/usb/lp0
and therefore makes the printer completely unusable with the above simple commands, until it is unplugged and plugged back in, and re-registered as a /dev/usb/lp0
file. It should also be noted that when doing this the ownership of the /dev/usb/lp0
file will be reset, so you might want to add a crontab
or a udev
rule, or simply add desired user to the lp
group on Debian and derivatives.
Note two: to use the above commands, the printer must be in 'STAR Line' mode, which I think it is by default when bought new, but only takes a minute or two if not. Instructions on this, for the STAR SP500, are found on page 114 here: http://www.starasia.com/%5CDownload%5CManual%5Csp500_um_en.pdf
This isn't an exact answer to the original question but I spent hours working out how this printer works from the command line, and now I know how I really really wanted to share this for anyone who was stuck like me, as I kinda love it now that I've learnt about it.