Linux Label Printing with the Phomemo D30

I was looking to buy a new label printer, and found the modern consumer market is mainly comprised of cheap bluetooth-based thermal printers which are then managed via an app. In theory this is great, but in practice these printers usually require specific questionable applications to be used, often with sign-up/in requirements and widely scoped permission needs. Therefore the use of a specific app is a disqualifier for me.

After a little research, I landed on the Phomemo D30. I liked the look, replacement labels seemed cheap, and I found a couple of existing projects on GitHub specificially to support this printer for Linux.

I could connect to the printer direct with Bluetooth from my Fedora 42 KDE system like any other bluetooth device. To actually print, I chose to try the polskafan/phomemo_d30 Python based library. It was a little old, and therefore did not run on my host system Python version, so I decided to wrap it up in a docker container rather than get my main PC messy with libraries. I needed to specifically use rfcomm on the host system to pass bluetooth through to the container. With that done, i was able to successfully print from Linux!

Animation showing running a command, with a label printing from the portable printer

I probably don’t get the full range of functionality as you would with the app, such as various fonts, symbols, decoration etc… But ultimately I only need text printing, and this works very well with that since it will auto-fit and auto-scale text with multi-line support. Overall, I’m really happy with this cheap, private, and effective solution which serves as yet another great example of the utility of Open Source, and the wonderful community memebers like Polskafan who are building & sharing such libraries.

As referenced above, I wrapped this in a container setup, the Dockerfile of which can be found on Codeberg here along with some more detailed usage guidance.