ASSESSMENT.md §7 assumed the RFID encode was locked inside the Windows-only
GTSPL_SDK.dll and would need a USBPcap sniff or the GTSPL Java jar to recover.
It didn't. The DLL is a managed .NET assembly, and its IL shows every RFID call
is a one-line String.Concat -> ASCII -> WritePrinter. Recovered from ldstr order
plus argument order, and confirmed by a second independent decompile:
UHF WRITE H,2,12,E,"<24 hex>" UHF READ/QUERY ...
UHF GEN2 EPC|TID|USER|ACCESS|KILL <action>,"<pw>"
SET RFID <tagType>,<rw_pos>,<void>,<try>,<err>,<speed>,<retry> (dots, not mm)
&DEFAULT,i &CALIBRATE,A,R PRINT <set>, <copy>
So the whole recipe is plain ASCII over the printer's bulk endpoint and ports to
macOS with no vendor binaries at all.
- mac/urovo.py USB transport + full GTSPL command set, status decoding, the
ribbon-latch recovery, SKU<->EPC packing ported from daemon.cs.
- mac/label.py PIL bitmap renderer -> TSPL BITMAP. Media-profile driven, so both
shop stocks work (small 51x19 and large 55x24 on the 24mm web),
with a safe-area inset so the design can't clip at the edges.
- mac/daemon.py :7790 HTTP service, same routes/JSON/CORS as daemon.cs, plus a
/preview route that renders a label as PNG without printing one.
Verified on the bench from macOS: printer identifies (MODEL:UROVO-D812R), the
latched 0x08 "out of ribbon" clears with SET RIBBON OFF + FORMFEED, and labels
print correctly oriented and dark on the 24x55 stock.
NOT yet verified: the RFID encode itself. It is wired and the printer accepts the
command, but the loaded thermal stock has no inlays so nothing has been written to
a chip. Needs a PET RFID label at the antenna. The SKU<->EPC byte layout also
remains unconfirmed against existing Chafon-written tags.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
||
|---|---|---|
| mac | ||
| .gitignore | ||
| ASSESSMENT.md | ||
| build.cmd | ||
| chafcheck.cs | ||
| daemon.cs | ||
| GTSPL_SDK_C.dll | ||
| GTSPL_SDK.dll | ||
| hidapi.dll | ||
| PROGRESS.md | ||
| README.md | ||
| start-daemon.cmd | ||
| UHFPrimeReader.dll | ||
| zlib.net.dll | ||
pricegod-urovo-daemon
The Windows counterpart to the Mac rfid-daemon. Instead of a Chafon gun writing a
loose chip while a Dymo prints a separate sticker, this drives the Urovo D812R+ (RFID)
to print the label AND encode the UHF chip in one pass on the composite (paper+chip) rolls.
It listens on http://localhost:7790/ with CORS *, so it's a drop-in for the PriceGod
extension's existing daemon.js client — same port, same JSON shape.
Run it
Double-click start-daemon.cmd (leave the window open while you work). That's it —
no Node, no .NET SDK, no gitea clone. It's a self-contained .exe.
To rebuild after editing daemon.cs: double-click build.cmd.
What's inside
daemon.cs— the service (C#, .NET Framework 4.x).pricegod-urovo-daemon.exe— the compiled daemon.GTSPL_SDK.dll,GTSPL_SDK_C.dll,zlib.net.dll— the Gainscha/Urovo print SDK (must sit beside the .exe). Copied from the vendor Windows SDK.
The print/encode sequence is a straight port of the proven gtcheck.cs rfidgo path:
SET RIBBON OFF → continuous geometry (GAP 0, RFID rolls blind the optical gap sensor)
→ writeUHF → draw text + QR → printlabel → read-back verify.
Routes
| method | path | body | returns |
|---|---|---|---|
| GET | /status |
— | {ok, ready, status, statusText, printer} |
| POST | /print-encode |
{sku, releaseId, artist?, title?, price?, condition?, w?, h?, gap?} |
{ok, sku, releaseId, epc, verified, status} |
| POST | /write-tag |
alias of /print-encode (the daemon.js name) |
same |
| GET | /read-tag |
— | {ok, epc, sku, releaseId, recognized} |
| POST | /calibrate |
— | RFID auto-calibration |
| POST | /recover |
— | ribbon-off + one feed to clear a fault |
Quick test (PowerShell):
Invoke-RestMethod http://localhost:7790/status
SKU ↔ EPC scheme (⚠ verify)
The 96-bit EPC (12 bytes) is packed as: 6 bytes 14-digit timestamp SKU · 4 bytes
release_id · 2 bytes 0xEC01 marker. This lives in the Epc class in daemon.cs and
is the only thing that needs to change if it must match a different (Mac/Chafon) layout —
nothing else depends on the byte order. Confirm by reading an existing tag: put a
Chafon-written record at the antenna and GET /read-tag.
Notes / open items
- Default label geometry is
65×37 mm, continuous (GAP 0). Adjust to your actual RFID roll via thew/h/gapfields, or change theDEF_*constants. - The label layout (text lines + QR) is functional, not yet pixel-matched to the 51×19
Dymo design in the extension's
labels.js. - The Chafon gun is still needed for reading a loose tag off a shelf — the Urovo can only read/write a tag physically inside the printer.