macOS tooling and a Codex skill for reverse-engineered Bluetooth Low Energy label printers.
This is unofficial software. It currently supports:
Before printing custom artwork, inspect a nearest-neighbor enlarged preview and reject layouts where icons, dividers, waveforms, arrows, bolts, dots, frames, or borders touch or crowd the text. Text should be treated as the primary content; decorative elements should be omitted unless they fit with clear whitespace.
For PT-N25BT bitmap labels, tools/ptn25bt/generate_prn.py includes helper
functions for custom scripts:
pixel_text_box(...) computes the exact box for bitmap text.assert_boxes_clear(...) rejects layout boxes that collide or get closer
than the configured padding.Use at least 4 px of clearance between text and non-text decorations, and 8-12 px when there is enough room.
swiftc and codesign.python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
Optional BLE scanner:
./scripts/build-ble-scan.sh
open -Wn .build/BLEScan.app \
--stdout work/ble-scan.out \
--stderr work/ble-scan.err \
--args --scan-seconds 20
Build:
./scripts/build-ptn25bt.sh
Generate a 1bpp preview and PRN:
. .venv/bin/activate
python tools/ptn25bt/generate_prn.py work/brother-hello.prn \
--text "HELLO" \
--length-px 320 \
--preview-png work/brother-hello.png
Review work/brother-hello.png, then print:
open -Wn .build/PTN25BT.app \
--stdout work/brother-print.out \
--stderr work/brother-print.err \
--args --name PT-N25BT --scan-seconds 60 send-file "$PWD/work/brother-hello.prn"
Known-good defaults:
ESC i d = 0.13.4 mm of blank trailing raster columns appended after the artwork.Useful calibration patterns:
python tools/ptn25bt/generate_prn.py work/brother-border.prn \
--calibration border \
--length-px 220 \
--border-px 2 \
--preview-png work/brother-border.png
python tools/ptn25bt/generate_prn.py work/brother-showoff.prn \
--calibration showoff \
--length-px 560 \
--preview-png work/brother-showoff.png
Build:
./scripts/build-supvan-e10.sh
Generate a true 1bpp preview and compressed .spv job:
. .venv/bin/activate
python tools/supvan-e10/generate_job.py work/e10-hello.spv \
--text "HELLO" \
--length-mm 40 \
--preview-png work/e10-hello.png
Review work/e10-hello.png, then print:
open -Wn .build/SupvanE10.app \
--stdout work/e10-print.out \
--stderr work/e10-print.err \
--args --name T0011 --scan-seconds 25 send-file "$PWD/work/e10-hello.spv"
Known-good defaults:
6.0 mm of blank trailing columns appended after the artwork.4; the app supports up to 7.Useful calibration pattern:
python tools/supvan-e10/generate_job.py work/e10-border.spv \
--calibration border \
--length-px 240 \
--preview-png work/e10-border.png
This repository is also a Codex skill. The root SKILL.md contains the operational workflow for agents that need to generate, inspect, or print labels.
Install it directly as a local Codex skill:
mkdir -p ~/.codex/skills
git clone https://github.com/johnboiles/ble-label-printers.git \
~/.codex/skills/ble-label-printers
BLE service and characteristics:
A76EB9E0-F3AC-4990-84CF-3A94D2426B2BA76EB9E1-F3AC-4990-84CF-3A94D2426B2BA76EB9E2-F3AC-4990-84CF-3A94D2426B2BA76EB9E3-F3AC-4990-84CF-3A94D2426B2BA76EB9E4-F3AC-4990-84CF-3A94D2426B2BBLE write-without-response payloads are framed as:
06 f0 <packet_count> 00 <payload>
Successful segment ACK:
06 f0 01
Observed device:
T0011B2112291094FEE70000E0FF-3C17-D293-8E48-14FE2E4DA212FFE1FFE9FFEAThe Android app maps E10 to T15Print:
dpi = 8.0fMaxDotValue = 96mPerLineByte = 12printingProcess = 15Command frames start with 7e 5a, command responses echo the command byte at
offset 7, and E-series bulk frames are sent as 512-byte frames split into four
128-byte BLE writes.
5 commits
Swift
61.9%
Python
35.5%
Shell
2.6%
macOS tooling and a Codex skill for reverse-engineered Bluetooth Low Energy label printers.
This is unofficial software. It currently supports:
Before printing custom artwork, inspect a nearest-neighbor enlarged preview and reject layouts where icons, dividers, waveforms, arrows, bolts, dots, frames, or borders touch or crowd the text. Text should be treated as the primary content; decorative elements should be omitted unless they fit with clear whitespace.
For PT-N25BT bitmap labels, tools/ptn25bt/generate_prn.py includes helper
functions for custom scripts:
pixel_text_box(...) computes the exact box for bitmap text.assert_boxes_clear(...) rejects layout boxes that collide or get closer
than the configured padding.Use at least 4 px of clearance between text and non-text decorations, and 8-12 px when there is enough room.
swiftc and codesign.python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
Optional BLE scanner:
./scripts/build-ble-scan.sh
open -Wn .build/BLEScan.app \
--stdout work/ble-scan.out \
--stderr work/ble-scan.err \
--args --scan-seconds 20
Build:
./scripts/build-ptn25bt.sh
Generate a 1bpp preview and PRN:
. .venv/bin/activate
python tools/ptn25bt/generate_prn.py work/brother-hello.prn \
--text "HELLO" \
--length-px 320 \
--preview-png work/brother-hello.png
Review work/brother-hello.png, then print:
open -Wn .build/PTN25BT.app \
--stdout work/brother-print.out \
--stderr work/brother-print.err \
--args --name PT-N25BT --scan-seconds 60 send-file "$PWD/work/brother-hello.prn"
Known-good defaults:
ESC i d = 0.13.4 mm of blank trailing raster columns appended after the artwork.Useful calibration patterns:
python tools/ptn25bt/generate_prn.py work/brother-border.prn \
--calibration border \
--length-px 220 \
--border-px 2 \
--preview-png work/brother-border.png
python tools/ptn25bt/generate_prn.py work/brother-showoff.prn \
--calibration showoff \
--length-px 560 \
--preview-png work/brother-showoff.png
Build:
./scripts/build-supvan-e10.sh
Generate a true 1bpp preview and compressed .spv job:
. .venv/bin/activate
python tools/supvan-e10/generate_job.py work/e10-hello.spv \
--text "HELLO" \
--length-mm 40 \
--preview-png work/e10-hello.png
Review work/e10-hello.png, then print:
open -Wn .build/SupvanE10.app \
--stdout work/e10-print.out \
--stderr work/e10-print.err \
--args --name T0011 --scan-seconds 25 send-file "$PWD/work/e10-hello.spv"
Known-good defaults:
6.0 mm of blank trailing columns appended after the artwork.4; the app supports up to 7.Useful calibration pattern:
python tools/supvan-e10/generate_job.py work/e10-border.spv \
--calibration border \
--length-px 240 \
--preview-png work/e10-border.png
This repository is also a Codex skill. The root SKILL.md contains the operational workflow for agents that need to generate, inspect, or print labels.
Install it directly as a local Codex skill:
mkdir -p ~/.codex/skills
git clone https://github.com/johnboiles/ble-label-printers.git \
~/.codex/skills/ble-label-printers
BLE service and characteristics:
A76EB9E0-F3AC-4990-84CF-3A94D2426B2BA76EB9E1-F3AC-4990-84CF-3A94D2426B2BA76EB9E2-F3AC-4990-84CF-3A94D2426B2BA76EB9E3-F3AC-4990-84CF-3A94D2426B2BA76EB9E4-F3AC-4990-84CF-3A94D2426B2BBLE write-without-response payloads are framed as:
06 f0 <packet_count> 00 <payload>
Successful segment ACK:
06 f0 01
Observed device:
T0011B2112291094FEE70000E0FF-3C17-D293-8E48-14FE2E4DA212FFE1FFE9FFEAThe Android app maps E10 to T15Print:
dpi = 8.0fMaxDotValue = 96mPerLineByte = 12printingProcess = 15Command frames start with 7e 5a, command responses echo the command byte at
offset 7, and E-series bulk frames are sent as 512-byte frames split into four
128-byte BLE writes.
5 commits
Swift
61.9%
Python
35.5%
Shell
2.6%