f6e35bbebf
An early wrong assumption named the QR/RFID access reader "GEE" / "GEE/Fondvision" / "GEE-QR-ER80" (and summarized a raw GEE PDF as its datasheet). There is no GEE device — it's the Dingtian DT-008 (dingtian-tech.com/en_us/qr_code_reader.html), the same vendor as the relay board, which is why it integrates the identical HTTP-GET-push way. Code: - Driver symbol geeQrReaderDriver → dingtianQrReaderDriver; label → "Dingtian DT-008 QR/RFID reader (HTTP push)"; comments/description rewritten to the real DT-008 facts (Wiegand 26/34, TCP/IP, USB, RS485 — not RS-232; QR/barcode + ID/IC/NFC — not DataMatrix/1D). - Persisted driverId "gee-qr-reader" → "dingtian-qr-reader" (the registry lookup key + the row created on assign in qr-reader.ts). - Migration 0015 rewrites existing devices.driver_id rows so configured readers keep resolving (applied to the dev DB — 2 rows; the booth applies it on boot). Behaviour is unchanged: naming + the persisted id only. Wiki + memory: - Renamed entities/gee-qr-er80.md → dingtian-dt008-reader.md and sources/gee-qr-er80.md → dingtian-dt008.md; rewrote both to the real DT-008 product-page specs while KEEPING all the verified-on-hardware protocol facts (cjihao serial, .jsp path, Connection: close). Fixed every cross-reference + "GEE" mention in 6 other pages. Memory gee-reader-serial-binding → dingtian-reader-serial-binding. The only surviving "GEE" mentions are deliberate naming-correction notes, the raw PDF filename, and the append-only log history. Full workspace build/lint/test green; dev DB readers verified resolving to the registered dingtian-qr-reader driver. Claude-Session: https://claude.ai/code/session_01Xcm6ikLgGoCxxHrxtjkk5V
63 lines
2.8 KiB
Markdown
63 lines
2.8 KiB
Markdown
---
|
||
type: source
|
||
tags: [parking, hardware, readers, qr, protocol, sdk]
|
||
sources: [qrcode-sdk]
|
||
updated: 2026-06-16
|
||
---
|
||
|
||
# Source: QRCode SDK v1.6.5 (Dingtian DT-008 QR reader)
|
||
|
||
Vendor SDK for the QR access reader (the Dingtian [[dingtian-dt008-reader]]). Defines the
|
||
reader↔server **HTTP protocol** — the missing piece the datasheet omitted. Files at
|
||
`QRCode_sdk - QRCode_v1_6_5/sdk/` (config tool `QRCode_v1_6_5.exe`, demos in C#/PHP/VC++, protocol
|
||
docs `readme.txt`, `qrcode_HTTP_GET.txt`, `VC++/how to.txt`). **Not copied into `raw/`** — bulky +
|
||
binaries; this summary is the faithful capture. Entity: [[dingtian-dt008-reader]].
|
||
|
||
## The protocol — HTTP GET poll, server replies the verdict
|
||
|
||
The reader is configured (via the Windows tool) with a **server IP/port + "server language"**
|
||
(JSP/PHP/C#/ASP/CGI — this only selects the URL path, e.g. `/qa/mcardsea.php`; transport is plain
|
||
HTTP either way). **On each scan** the reader sends:
|
||
|
||
```
|
||
GET /qa/mcardsea.php?cardid=445D2C&mjihao=1&cjihao=HW256097&status=11&time=1540402036 HTTP/1.0
|
||
```
|
||
|
||
| Param | Meaning |
|
||
| --- | --- |
|
||
| `cardid` | **the scanned QR/barcode data** (or card id) |
|
||
| `mjihao` | device id (machine number) |
|
||
| `cjihao` | device serial number |
|
||
| `status` | **2 chars**: high = valid `1`/invalid `0` (reader's own pre-check), low = direction **`1`=in / `0`=out**. A 1-char status = fail. |
|
||
| `time` | UTC time |
|
||
|
||
**Server → reader reply (JSON) — this is the access DECISION and drives the beep + output:**
|
||
|
||
```json
|
||
{"data":[{"cardid":"<echo>","cjihao":0,"mjihao":1,"status":1,"time":"<utc>","output":2}],"code":0,"message":""}
|
||
```
|
||
|
||
| Reply field | Meaning (from the C# demo comments) |
|
||
| --- | --- |
|
||
| `status` | **`1` = valid → buzzer 2×; `0` = invalid → buzzer 1×** |
|
||
| `output` | **`0` = Access, `1` = WG26, `2` = WG34** — output line/format driven on a valid read |
|
||
| `time` | UTC — **can sync the device clock** |
|
||
| `code` | `0` = success |
|
||
|
||
> **Implication (explains the "no beep"):** the reader's beep/accept is decided by the **server's
|
||
> reply**, not locally. A non-JSON / missing reply ⇒ no valid feedback ⇒ no beep, even though the
|
||
> scan succeeded. So "no beep" ≠ "didn't scan" — it means the server didn't answer with the verdict.
|
||
|
||
## Integration consequence
|
||
|
||
This is **host-in-the-loop, synchronous**: the GET *is* the access query; our JSON reply *is* the
|
||
decision. So the backend endpoint must **decide (valid/invalid + direction) and reply** — richer
|
||
than a fire-and-forget read. Direction comes from the `status` low digit. See [[dingtian-dt008-reader]] +
|
||
[[device-input-flow]].
|
||
|
||
## Defaults / misc
|
||
|
||
- Default device IP `192.168.1.99` (`readme.txt`).
|
||
- Demos: PHP `qa/mcardsea.php` (minimal echo, status 0), C# raw-socket server on :80 (full parse),
|
||
VC++ raw HTTP example. All show the same GET-in / JSON-out contract.
|