v1.2.0 — Niimbot B1 support + faster, self-identifying driver
Adds the Niimbot B1 (203 dpi, protocol 3) to the driver alongside the B1 Pro, and makes multi-label printing fast, continuous, and safe. Validated on real B1 hardware.
Added
- Niimbot B1 (
b1task, 203 dpi) — full print path: post-connect handshake,PrintStart 7b,PageStart,SetPageSize 6b, total-mode rows, status poll,PrintEnd. - Model auto-identification — the B1 and B1 Pro share the BLE name, so the driver reads the model id (
0x40[08], B1=4096 / B1 Pro=4097) and protocol version on connect, exposesNiimbot.printer, and refuses to print on a task/dpi mismatch.Niimbot.identify(model)returns it without printing. copies—printImage(url, { copies:N })uploads the image once and the printer repeats it (as niim.blue does), far faster than re-sending.- Frame bundling — several row frames per BLE write (
Niimbot.BUNDLE_MAX, default 240) so even worst-case dense pages stream without stalling between labels. Niimbot.disconnect()— drop the link to pair another printer; demo gained Identify/Disconnect buttons and a 3-copies button.
Changed / Fixed
- B1 prints a batch as one continuous job of N pages (no retract between labels), matching the B1 Pro path.
- Print-position calibration (
offset_y_px); row pacing aligned to niim.blue's 10 ms; flow control + handshake now follow the detected model.
Validated printers
| Model | task | dpi |
|---|---|---|
| Niimbot B1 Pro | v4 |
300 |
| Niimbot B1 | b1 |
203 |
Other models in the same protocol families are likely compatible but untested. See docs/protocol-v4.md and README.md.
🤖 Generated with Claude Code