Cross-platform label maker app for the Nelko P21 thermal printer. Works on Linux and Windows!
Written in Go using Fyne
Based on the reverse engineering work from merlinschumacher/nelko-p21-print.
Here are some vibe docs, I really don't expect anyone to use it but if you stumble upon this and think it's useful, create a new issue and I'll help you get it working and get better docs. Just call the issue "Software missing a good onboarding process" or some shit and we'll work it out. I would be down to package for Flatpak, Snap, and AppImage (plus deb/rpm) if there was genuine interest.
# One-time setup
./setup.sh
# Run the app
./nelko-print- Download
nelko-print.exefrom releases (or build from source) - Pair your Nelko P21 via Windows Bluetooth settings
- Run the app and select your printer's COM port
- Print!
| Platform | Status | Notes |
|---|---|---|
| Linux (x64) | ✅ Full support | Auto Bluetooth connection via rfcomm |
| Windows (x64) | ✅ Full support | Uses COM ports (auto-detected when BT paired) |
| macOS | ❌ Not tested | PRs welcome! |
# Fyne deps
sudo apt install -y libgl1-mesa-dev xorg-dev
# Bluetooth
sudo apt install -y bluez
# Add yourself to dialout group (one-time, then logout/login)
sudo usermod -aG dialout $USER- Go 1.22+ (for building from source)
- No additional dependencies for running pre-built exe
make build
# or
go build -o nelko-print ./cmd/nelko-printgo build -o nelko-print.exe ./cmd/nelko-print# Install cross-compiler first
make install-cross-deps
# Build Windows exe
make build-windowsmake build-all- Pair the printer via your system's Bluetooth settings (one-time setup)
- Run the app:
./nelko-print - Select your printer from the dropdown (auto-detects Nelko devices)
- Click Connect - the app will prompt for your password via
pkexecto establish the Bluetooth connection - Load an image or type text, then print!
The app automatically handles the RFCOMM connection that previously required manual terminal commands.
- Pair the printer via Windows Settings → Bluetooth & devices
- Note the COM port assigned (check Device Manager → Ports if unsure)
- Run the app:
nelko-print.exe - Select your COM port from the dropdown
- Click Connect and print!
On Windows, paired Bluetooth SPP devices appear as COM ports automatically - no special setup needed.
If you prefer manual control or the auto-connect doesn't work:
# Pair the printer first (one-time)
bluetoothctl
> scan on
> pair XX:XX:XX:XX:XX:XX
> trust XX:XX:XX:XX:XX:XX
> quit
# Create RFCOMM device manually
sudo rfcomm connect /dev/rfcomm0 XX:XX:XX:XX:XX:XX 1
# Run the app and use "Advanced" section to connect to /dev/rfcomm0
./nelko-print- Image printing: Load PNG, JPG, GIF, BMP, WebP images
- Text labels: Type text directly with adjustable font size
- Orientation: Horizontal or Vertical text layout
- Invert: White-on-black or black-on-white
- Word wrap options: Break anywhere or only on spaces
- Multiple copies: Print multiple labels at once
- Density control: Adjust print darkness
- 12x40mm
- 14x40mm (default)
- 14x50mm
- 14x75mm
- 15x30mm
The Nelko P21 uses Bluetooth Serial Port Profile (SPP/RFCOMM) for communication.
On Linux: The rfcomm tool creates a virtual serial device (/dev/rfcommN) that the app can write print commands to. The app handles this automatically with privilege escalation.
On Windows: Paired Bluetooth SPP devices appear as COM ports automatically. Just select the right COM port and connect.
Both platforms then communicate using TSPL2 print commands over the serial connection.
Add yourself to the dialout group:
sudo usermod -aG dialout $USERThen log out and back in.
sudo apt install bluezInstall PolicyKit agent for your desktop:
# GNOME/Zorin
sudo apt install policykit-1-gnome
# KDE
sudo apt install polkit-kde-agent-1- Open Device Manager
- Expand "Ports (COM & LPT)"
- Look for a Bluetooth-related COM port (may say "Standard Serial over Bluetooth link")
- Note the COM number (e.g., COM3)
Some Windows versions need you to manually add the Serial Port service:
- Settings → Bluetooth & devices → Devices
- Click on your printer → More Bluetooth options
- COM Ports tab → Add → Outgoing → Select your printer
Make sure the printer is paired in your system's Bluetooth settings first. The app only shows devices that are already paired.
- Make sure the printer is powered on and in range
- Try re-pairing the printer
- On Linux, use the manual method with
rfcomm connectto see detailed error messages
MIT