A Go client for the thermal printer knows as "cat printer".
This project implements the "cat printer" protocol in Go and is based on the amazing work done by the authors of the projects linked below.
Bluetooth support is brought by the Go Bluetooth library, which is part of the TinyGo project.
Installation:
$ go install github.com/piger/gattoprint@latest
This project is based on the reverse engineering of the Android app iPrint, which is the official client for this printer; using this program instead of the official client might damage your printer.
Tested on:
- Debian 11 (Raspbian GNU/Linux 11 (bullseye)) on a Raspberry Pi 4b.
- macOS Monterey (12.5)
Due to the requirements of the Go Bluetooth library cross-compiling this program is not supported, or at least is not as straightforward as it's usually for Go programs.
On macOS this program must be allowed to use Bluetooth; in the "Security & Privacy" section of the "System Preferences" app, in the "Privacy" section, you must add this program to the apps allowed to use Bluetooth.
If you run this program from a terminal like iTerm2 then the program to be added is iTerm itself.
- WerWolv/PythonCatPrinter -- the original project that seem to have started it all.
- amber-sixel/gb01print -- a fork of the above project.
- catprinter -- a Python client for the printer.
- Thermal Printer wiki -- some information about the printing protocol.
- iPrint Utility -- a Windows client for the printer.