Your Peace of Mind is our Commitment

Contact Us English Recent Articles

Using the Star TSP552II with CUPS

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.

Installation

  1. If necessary, install the packages libcups2-dev and libcupsimage2-dev

    apt-get install libcups2-dev and libcupsimage2-dev
  2. Download the starcupsdrv-3.5.0_linux_20150120.tar.gz archive from the Star driver download page.
  3. Extract the archive using tar -zxvf starcupsdrv-3.5.0_linux_20150120.tar.gz
  4. 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
  5. Download the modified filter source code rastertostarlm.c
  6. Move rastertostarlm.c to the ~/starcupdrv-3.5.0_linux/SourceCode/starcupsdrv/src directory
  7. 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.

  8. Download the PPD for TSP552II
  9. 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".
  10. 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.
  11. Enter a name, description and location. Select "Share This Printer" if you want to use it from other hosts on your network. Click Continue.
  12. Under "Or Provide a PPD File:" click Browse... and select the file tsp552.ppd . Click Add Printer.
  13. Select the desired media size and click Set Default Options.

The printer is ready for use. Send a test page.

Limitations

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:

Nevertheless, it is good enough to print single page address labels, which was the objective.

Technical

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.

Conclusion

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.


Gallery

PPD for the TSP552IIPPD for the TSP552II
Modified filter source code.Modified filter source code.

More Information