qr-reader: gee-qr-reader driver — assign in wizard, resolve lane by serial
The QR reader is a push device and the setup wizard assigns random-UUID ids, so
'id = serial' can't be set via the UI. Add a dedicated gee-qr-reader driver
(reader category) with a single 'serial' config field; the admin assigns it
normally and enters the device's serial (its cjihao).
The QR endpoint now resolves the lane by matching lane_devices.config.serial to
the scan's cjihao (instead of row id == cjihao), so no DB hand-editing. An
unassigned serial resolves to no lane -> status:0, gracefully.
Verified via inject through the real /api/setup/assign: assign {serial:
H05M2AFA} -> .jsp scan with a matching permit QR -> status:1 (accept) + open;
re-scan -> permit exit; unknown card -> status:0; unassigned serial -> status:0.
This commit is contained in:
+13
@@ -668,3 +668,16 @@ guarantee. Recorded in [[dingtian-relay]] (new Hardening section).
|
||||
- Real serial **cjihao=H05M2AFA** = the lane key → assign reader as lane_devices.id="H05M2AFA".
|
||||
Reader beeped on status:0 (invalid/1-beep); a matching permit/session → status:1 (2-beep accept).
|
||||
- Updated [[gee-qr-er80]] (verified-on-hardware).
|
||||
|
||||
## [2026-06-16] feature | gee-qr-reader driver — assign by serial, resolve lane by config
|
||||
- The QR reader is a push device; setup wizard always assigns a random-UUID id, so "id = serial"
|
||||
isn't possible via the UI. Clean fix instead: new **`gee-qr-reader`** driver (reader category) with
|
||||
a single `serial` config field. Admin assigns it in the wizard (UUID id) + types the serial.
|
||||
- QR endpoint now resolves the lane by **matching `lane_devices.config.serial` to the scan's
|
||||
`cjihao`** (was: row id == cjihao). `qrReaderRoutes(app, db, dispatcher)`. Unassigned serial →
|
||||
no lane → status:0 (graceful).
|
||||
- `tcpip-reader` flagged as the WRONG model for this device (host-connects-out stub).
|
||||
- VERIFIED via inject through the real /api/setup/assign: assign {serial:"H05M2AFA"} → .jsp scan +
|
||||
matching permit → status:1 + open; re-scan → exit; unknown card → status:0; unassigned serial →
|
||||
status:0. Full build 5/5.
|
||||
- Updated [[gee-qr-er80]] (assignment as-built).
|
||||
|
||||
Reference in New Issue
Block a user