552d87d75b
The park-buzi printer is a K200L (Xprinter/ICS XP-K200L; its LAN board and USB descriptor call it "POS-80"). Its board serves the Rongta's five-row status table under /prt_status.htm — but the reply carries no HTTP status line or headers, which node:http rejects, so the Rongta driver could never read it and the unit was filed in July as "no status page → generic driver" (reachability only). New `k200l` driver (printer-k200l.ts): prints through the generic ESC/POS device (same bytes, TCP 9100 or usblp) and reads the page over a raw socket, tolerant of both the headerless and a proper HTTP reply. Mapping mirrors the Rongta: board unreachable → offline; page not understood → degraded, never ready; any fault → degraded naming it; USB → reachability floor. The Rongta driver is untouched. Tests replay the captured headerless page (devices suite 76). Live against the lab unit: ready; with the cover open the board reports cover open, paper out, off-line. Wiki: new k200l-printer entity (names, network setup from factory 192.168.123.100, board quirks, status page, what it means for park-buzi — over USB the app never saw cover/paper state at all), cross-links on the Rongta, status-monitoring, USB-transport and WSL-networking pages (parking-net pinned to eth1 while the LAN NIC is eth0), index. Claude-Session: https://claude.ai/code/session_01FWncR69HgGPuei1dLrW3cU
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
// Register all bundled drivers into the singleton registry. Importing this
|
|
// module wires the catalog. Add a new device by registering it here.
|
|
|
|
import { registry } from "../registry.js";
|
|
import { dingtianDriver } from "./access-dingtian.js";
|
|
import { stubAccessDriver } from "./access-stub.js";
|
|
import { dahuaDriver, hikvisionDriver } from "./camera.js";
|
|
import { escposDriver } from "./printer-generic.js";
|
|
import { k200lDriver } from "./printer-k200l.js";
|
|
import { rongtaDriver } from "./printer-rongta.js";
|
|
import { dingtianQrReaderDriver, tcpipReaderDriver, wiegandReaderDriver } from "./reader.js";
|
|
|
|
let registered = false;
|
|
|
|
/** Idempotently register the built-in drivers. Called once at server startup. */
|
|
export function registerBuiltinDrivers(): void {
|
|
if (registered) return;
|
|
registered = true;
|
|
registry.register(dingtianDriver);
|
|
registry.register(stubAccessDriver);
|
|
registry.register(wiegandReaderDriver);
|
|
registry.register(tcpipReaderDriver);
|
|
registry.register(dingtianQrReaderDriver);
|
|
registry.register(hikvisionDriver);
|
|
registry.register(dahuaDriver);
|
|
registry.register(rongtaDriver);
|
|
registry.register(k200lDriver);
|
|
registry.register(escposDriver);
|
|
}
|
|
|
|
export {
|
|
dingtianDriver,
|
|
stubAccessDriver,
|
|
wiegandReaderDriver,
|
|
tcpipReaderDriver,
|
|
dingtianQrReaderDriver,
|
|
hikvisionDriver,
|
|
dahuaDriver,
|
|
rongtaDriver,
|
|
k200lDriver,
|
|
escposDriver,
|
|
};
|