feat(devices): DT-008 reader discovery + auto-configuration over the vendor UDP protocol
Build & push images / images (push) Successful in 3m7s

The Dingtian DT-008's Windows-only config tool speaks a small binary UDP protocol
(reader :24680 unicast get/set, :24582 broadcast search/set-network), reversed in
wiki/raw/dingtian_qr_linux (PROTOCOL.md + dingtian_qr.py, copied to scripts/). Reading
park-2's readers with it from the booth found both in WG26 output mode — the "beeps but
captures nothing" enrolment failure: they never pushed HTTP at all.

The app now speaks the protocol itself (packages/devices dingtian-qr-config.ts, Node dgram,
host-network container) and the dingtian-qr-reader driver uses it:
- discover(): first driver to implement the wizard's Scan capability; rows show serial, IP,
  output mode, current server target, card format, firmware.
- preconditions: output type must be HTTP (fixable — save switches it); typed serial must
  equal the reported one and the reader must answer on UDP (both block the save).
- configureInputPush(): set-network the reader's server to this booth's IP + listen port,
  confirmed by polling (the reader applies it without an ack and is silent for seconds).
- usesPushAuth=false: the scan GET carries no credentials, so no push secret is stored.
- a reader saved without an IP warns instead of failing (legacy vendor-tool setup).

Verified on the bench unit: WG26→HTTP, target 8080→8081→8080, struct byte-identical after.
15 protocol tests against a fake reader + 17 adapter tests. Wiki: device-discovery,
first-run-setup, dingtian-dt008-reader, site-device-installation §2 (SSH procedure; the
"needs a Windows laptop" claim withdrawn), new source page dingtian-qr-linux-tool.
This commit is contained in:
2026-10-08 15:22:33 +02:00
parent 08351a09bf
commit b7efa081ec
22 changed files with 2873 additions and 65 deletions
+10 -2
View File
@@ -855,7 +855,7 @@ function DeviceForm({
{scanning ? t("setup.scanning") : t("setup.scan")}
</button>
{scanError && <span className="ml-2 text-[0.75rem] text-term-red">{scanError}</span>}
{found && found.length === 0 && <p className="mt-2 text-[0.75rem] text-term-muted">{t("setup.noControllersFound")}</p>}
{found && found.length === 0 && <p className="mt-2 text-[0.75rem] text-term-muted">{t("setup.noDevicesFound")}</p>}
{found && found.length > 0 && (
<ul className="mt-2 list-none p-0">
{found.map((d) => (
@@ -865,7 +865,15 @@ function DeviceForm({
</button>
<strong className="text-term-text">{d.label}</strong>
<HealthBadge status={d.health.status} />
{d.info?.firmware && <span className="text-term-muted"> · fw {d.info.firmware}</span>}
{/* Whatever the driver reports (firmware; for a reader its output mode +
current push target — so a reader still in WG26 or pointing at another
server is visible BEFORE it is assigned). */}
{d.info &&
Object.entries(d.info).map(([k, v]) => (
<span key={k} className="text-term-muted">
{" "}· {k} {v}
</span>
))}
</li>
))}
</ul>
+3 -3
View File
@@ -532,9 +532,9 @@ export const en: Catalog = {
unbound: "unbound",
noDrivers: "No drivers registered.",
chooseDevice: "Choose a device…",
scan: "Scan for controllers",
scan: "Scan the LAN",
scanning: "Scanning…",
noControllersFound: "No controllers found on the LAN.",
noDevicesFound: "No devices found on the LAN (the booth and the device must share the device VLAN).",
usbNoneFound: "No USB printer found (/dev/usb/lpN) — check cable/power; the path can be typed manually.",
usbSavedMissing: "saved — not present now",
use: "Use",
@@ -553,7 +553,7 @@ export const en: Catalog = {
chooseAddress: "Choose an address…",
onDeviceSubnet: "— on device subnet",
noNicOnSubnet: "⚠ no NIC on the device's subnet — the device may not reach the backend",
backendIpHint: "The address this device will POST input events to.",
backendIpHint: "The address this device will push its events/scans to.",
relaysTitle: "Relays on this controller",
relaysHint:
"Each relay opens one barrier. Set its direction; for transient entry, set which input terminal the entry button is wired to.",
+3 -3
View File
@@ -540,9 +540,9 @@ export const sq = {
// Device form.
noDrivers: "Asnjë drejtues i regjistruar.",
chooseDevice: "Zgjidh një pajisje…",
scan: "Skano për kontroller",
scan: "Skano LAN-in",
scanning: "Duke skanuar…",
noControllersFound: "Asnjë kontroller në LAN.",
noDevicesFound: "Asnjë pajisje në LAN (kabina dhe pajisja duhet të jenë në të njëjtin VLAN).",
usbNoneFound: "Nuk u gjet asnjë printer USB (/dev/usb/lpN) — kontrollo kabllon/ushqimin; rruga mund të shkruhet me dorë.",
usbSavedMissing: "i ruajtur — jo i pranishëm tani",
use: "Përdor",
@@ -561,7 +561,7 @@ export const sq = {
chooseAddress: "Zgjidh një adresë…",
onDeviceSubnet: "— në subnetin e pajisjes",
noNicOnSubnet: "⚠ asnjë NIC në subnetin e pajisjes — pajisja mund të mos arrijë backend-in",
backendIpHint: "Adresa te e cila kjo pajisje do të dërgojë eventet e hyrjes.",
backendIpHint: "Adresa te e cila kjo pajisje do të dërgojë eventet/skanimet.",
// Relay editor.
relaysTitle: "Relet në këtë kontroller",
relaysHint: