No description
  • Rust 94.9%
  • Shell 5.1%
Find a file
2026-08-14 15:33:45 -06:00
src nametag: rename Position to Role 2026-08-14 15:33:45 -06:00
systemd fix: add ^PW600 to ZPL to prevent 4-char truncation 2026-08-13 16:40:51 -06:00
udev fix: add ^PW600 to ZPL to prevent 4-char truncation 2026-08-13 16:40:51 -06:00
.gitignore fix: add ^PW600 to ZPL to prevent 4-char truncation 2026-08-13 16:40:51 -06:00
AGENTS.md Update all documentation for TSPL/Munbyn ITPP941 2026-08-14 11:25:11 -06:00
Cargo.lock fix: add ^PW600 to ZPL to prevent 4-char truncation 2026-08-13 16:40:51 -06:00
Cargo.toml fix: add ^PW600 to ZPL to prevent 4-char truncation 2026-08-13 16:40:51 -06:00
deploy.sh fix: handle IPv6 addresses in scp (add brackets) 2026-08-13 16:45:23 -06:00
DESIGN.md feat: add print layout profiles (generic, nametag, medication) 2026-08-14 14:41:41 -06:00
README.md Update all documentation for TSPL/Munbyn ITPP941 2026-08-14 11:25:11 -06:00

Label Printer Server

A minimal Rust web server that sends text labels to a Munbyn ITPP941 thermal printer over USB.

Features

  • Single-page web UI — type text, hit print
  • TSPL format for 52mm × 30mm labels
  • Direct USB bulk transfer (bypasses kernel driver)
  • Cross-compiled ARM64 binary for Raspberry Pi
  • Zero dependencies on the remote (single binary + systemd)

Quick Start

Build & Deploy

# Deploy to a remote Pi
./deploy.sh user@<ipv6-address>

# Or set it as an env var
export LABEL_PRINTER_HOST=user@<ipv6-address>
./deploy.sh

Manual Deploy

cross build --release --target aarch64-unknown-linux-gnu
scp target/aarch64-unknown-linux-gnu/release/label-printer-server user@<ipv6>:/home/user/label-printer-server/
ssh user@<ipv6> "sudo systemctl restart label-printer"

Architecture

Browser  ──HTTP──►  Rust Server (axum)  ──USB bulk──►  Munbyn ITPP941
(Yggdrasil)           :8080                   endpoint 0x02

Tech Stack

Component Choice
Language Rust (stable)
Web framework axum 0.8
USB printing rusb 0.9 (libusb)
Build cargo + cross
Deploy systemd service

API

Method Path Description
GET / Web page with text box + print button
POST /print Submit text for printing (text form field)

TSPL Notes

The Munbyn ITPP941 uses TSPL (TSC-compatible), not ZPL. ZPL commands are silently ignored.

Generated TSPL format:

SIZE 52 mm,30 mm
GAP 3 mm,0 mm
CLS
TEXT 7,20,"3",0,1,1,"{user_text}"
PRINT 1

Hardware

Item Value
Printer Munbyn ITPP941
Vendor ID 0x09c6
Product ID 0x0248
Resolution 203 DPI
Label size 52mm × 30mm
USB endpoint 0x02 (bulk OUT)
Instruction set TSPL (TSC-compatible)

Project Structure

label-printer-server/
├── src/
│   ├── main.rs          # Web server, routes, HTML
│   └── print.rs         # ZPL generation + USB bulk transfer
├── systemd/
│   └── label-printer.service
├── udev/
│   └── 99-zebra-printer.rules
├── deploy.sh
├── DESIGN.md
└── Cargo.toml

Future Improvements

  • Font size controls
  • Label templates
  • Print queue
  • Printer status detection
  • Barcode support
  • askama templating