First published: 07th May 2015
The TSP552II is a thermal printer manufactured by Star Micronics. This technical note describes how it can be used with CUPS, the standards-based, open source printing system developed by Apple Inc. for OS X® and other UNIX®-like operating systems.
Unfortunately, Star has not released a Linux driver for the TSP552, but it was possible to modify a driver they have released.
If necessary, install the packages libcups2-dev and libcupsimage2-dev
apt-get install libcups2-dev and libcupsimage2-dev
- Download the starcupsdrv-3.5.0_linux_20150120.tar.gz archive from the Star driver download page.
- Extract the archive using
tar -zxvf starcupsdrv-3.5.0_linux_20150120.tar.gz
Extract the source code in starcupdrv-3.5.0_linux/SourceCode/starcupsdrv-src-3.5.0.tar.gz
cd ~/starcupdrv-3.5.0_linux/SourceCode tar -zxvf starcupsdrv-src-3.5.0.tar.gz
- Download the modified filter source code rastertostarlm.c
- Move rastertostarlm.c to the ~/starcupdrv-3.5.0_linux/SourceCode/starcupsdrv/src directory
Compile and install the driver
cd ~/starcupdrv-3.5.0_linux/SourceCode/starcupsdrv make make install
The make install script starts a CUPS server, kill it if it is not required.
- Download the PPD for TSP552II
- Registering the printer. Browse to the CUPS administration page (http://localhost:631/admin if your CUPS server is on the local machine). Click "Add Printer".
- Under Local Printers, select the port where the TSP522II is connected (I am using a USB to Parallel cable, the port appears as "Unknown" in the list, but it does work). Click Continue.
- Enter a name, description and location. Select "Share This Printer" if you want to use it from other hosts on your network. Click Continue.
- Under "Or Provide a PPD File:" click Browse... and select the file tsp552.ppd . Click Add Printer.
- Select the desired media size and click Set Default Options.
The printer is ready for use. Send a test page.
The modified ppd and filter are not perfect, development was stopped because of the amount of paper being used in testing. The major limitations are:
- Only the first page prints correctly. The second page is offset to the right and wrapped. This is probably related to not correctly resetting the printing position at the end of page.
- The ppd lists two resolutions, 203 x 201 DPI and 203 x 203 DPI, but only 203 x 203 DPI works correctly. The other is compressed vertically by 50%. This is probably caused by a mismatch in the resolution selection between the ppd and the filter.
Nevertheless, it is good enough to print single page address labels, which was the objective.
The original filter rastertostarlm.c is Copyright Star Micronics and released under the GNU General Public License version 2. The modified filter is released under the same license. You are welcome to modify it and fix all the remaining problems.
The tsp552.ppd file was modified from the Star SP500 Cutter ppd file included in the starcupsdrv-3.5.0_linux_20150120.tar.gz archive. Initial testing showed that that driver produced readable results, albeit greatly stretched, on the TSP552II so it was taken as a good starting point.
Printer commands were found in the TSP552 Programmer's Manual, but that does not give complete information. The print fine density graphics command is
<ESC> "k" n <0> d1, but only the first block of 24 lines was printing until a feed of 12/4mm
<ESC> "J" <FF>was added after each block.
Compiling the original rastertostarlm.c gives a warning that cupsRasterReadHeader is deprecated and cupsRasterReadHeader2 should be used instead. This has not been fixed.
Reading of the CUPS ppd documentation suggests that the sp552.ppd file has problems. Specifically, the entries *PCFileName, *1284DeviceID, *FileSystem, and *TTRasterizer seem to be technically incorrect, but they do not appear to affect the result so they have been left. The CUPS ppd test command, cupstestppd reports that the paper sizes are named incorrectly.
Hopefully these files can form the basis of a more correct driver for the TSP552II, written by someone with more time and paper. Good luck.