docs(wiki): park-2 event-loop stall incident + bounded-request-cost decision; Dingtian firmware retired, dev-board pinout, edge-controller memo
- concepts/park-2-event-loop-stall: /api/sessions/active ~2 s synchronous (quote() per open unpaid transient x664, unindexed ledger scans) froze the loop; Node runs expired timers before queued UDP replies, so healthy Dingtian pulses reported "timeout" and signed entries lost their snapshot/session row. Standing decision: bounded request cost whatever the operator data. - Dingtian: custom firmware retired (2026-10-23), runbook shelved, vendor pinout in raw/, relay-proxy PoC marked retired; edge-controller hardware memo (open).
This commit is contained in:
@@ -2,11 +2,14 @@
|
||||
type: concept
|
||||
tags: [parking, hardware, runbook, esp32, dingtian]
|
||||
sources: []
|
||||
updated: 2026-10-22
|
||||
updated: 2026-10-23
|
||||
---
|
||||
|
||||
# Runbook — Is this ESP32 board flashable? (Dingtian DT-R0xx lock test)
|
||||
|
||||
> **Shelved 2026-10-23** — custom Dingtian firmware is retired (user decision, mini PCs instead).
|
||||
> Kept as reference; never run on the bench unit.
|
||||
|
||||
A bench test that answers one question in a few minutes: **is the ESP32 on this [[dingtian-relay]]
|
||||
locked (standard SKU) or open (Development Board Version)?** Run it before ordering more units or
|
||||
planning any custom-firmware work (see [[dingtian-relay]] "Can we flash our own firmware?").
|
||||
@@ -25,39 +28,53 @@ blocks custom firmware:
|
||||
| `FLASH_CRYPT_CNT` (flash encryption) | flash contents unreadable/unwritable from outside | `espefuse summary` shows it odd/enabled |
|
||||
| `ABS_DONE_0` / `ABS_DONE_1` (secure boot) | ROM only runs a vendor-signed bootloader | `espefuse summary` shows it set |
|
||||
|
||||
The 74HC595 / 74HC165 shift registers on the board are **not** a blocker; community firmware drives
|
||||
them already.
|
||||
On the 2- and 4-channel boards relays and inputs are **direct GPIOs** (DT-R004: relays IO16/IO2/IO32/IO12,
|
||||
inputs IO36/IO39/IO33/IO35, UART IO1/IO3, PHY JL1101 on RMII with IO23 MDC / IO18 MDIO / IO17 clock /
|
||||
IO0 PHY power); only the 8/16/32-channel boards use 74HC595/74HC165 shift registers. Neither is a
|
||||
blocker; community firmware drives both.
|
||||
|
||||
## Equipment
|
||||
|
||||
- USB-to-UART adapter, **3.3 V logic** (CP2102 / CH340 / FT232). Set its jumper to 3.3 V.
|
||||
- Dupont leads. Do **not** connect the 12 V supply; the adapter's 3.3 V powers the ESP32 for this test.
|
||||
- USB-to-UART adapter, **3.3 V logic** (CP2102 / CH343 / FT232; a CH340 clone needs the old
|
||||
WCH 3.4 driver on Windows — see [[relay-proxy-firmware]]). Set its jumper to 3.3 V.
|
||||
- Dupont leads. Do **not** connect the board's 12 V supply; the adapter's 3.3 V powers the ESP32.
|
||||
- A PC with Python: `pip install esptool` (gives both `esptool.py` and `espefuse.py`).
|
||||
|
||||
## Wiring (DT-R0xx programming header)
|
||||
## The debug header (DT-R004) — from the vendor's dev-board repo
|
||||
|
||||
| Adapter | Board |
|
||||
| --- | --- |
|
||||
| GND | GND |
|
||||
| 3V3 | 3V3 |
|
||||
| TXD | RXD (ESP32 GPIO3) |
|
||||
| RXD | TXD (ESP32 GPIO1) |
|
||||
| DTR | NRST (optional; lets esptool reset the board itself) |
|
||||
Source: `raw/dingtian_dev_pinout/` (photos + GPIO table from
|
||||
[dtlzp/relay_dev_demo](https://github.com/dtlzp/relay_dev_demo/tree/master/gpio_pinout)).
|
||||
It is the **unlabelled pin header right next to the ESP32-WROOM-32D module**, left edge of the
|
||||
board under the relays. **There is no BOOT switch on the board** — the only button is `FACTORY`
|
||||
(IO34, the firmware's factory-reset button) and it plays no part in flashing. Download mode is
|
||||
entered the bare-ESP32 way: **IO0 held to GND while NRST is pulsed to GND** (or while power comes
|
||||
up).
|
||||
|
||||
Header labelling varies by revision; confirm against the silkscreen. GPIO1/3 are also the board's
|
||||
Modbus UART, so expect the stock firmware to chatter on them when it boots.
|
||||
| Pin (from the GND end) | ESP32 | Role |
|
||||
| --- | --- | --- |
|
||||
| 1 | GND | ground |
|
||||
| 2 | IO3 | U0RXD — adapter **TX** goes here |
|
||||
| 3 | IO1 | U0TXD — adapter **RX** goes here |
|
||||
| 4 | NRST | reset, active LOW (adapter DTR/RTS or a jumper to GND) |
|
||||
| 5 | IO0 | boot strap — **to GND for download mode** (also RMII_RST/PWR on this board) |
|
||||
| 6 | 3.3V | power in from the adapter |
|
||||
| 7, 8 (V2 boards only) | IO4, IO5 | CAN_RX / CAN_TX — not used for flashing |
|
||||
|
||||
V1 (hw V3.6.8 photo) has the 6-pin row; V2 adds IO4/IO5 for 8 pins. The order is identical.
|
||||
Confirm GND with a multimeter against the terminal-block GND before powering anything.
|
||||
|
||||
## Procedure
|
||||
|
||||
1. Wire as above, adapter unplugged.
|
||||
2. **Hold the board's boot switch** while plugging the adapter into USB. Keep holding ~1 s, release.
|
||||
(Without DTR wired, this is the only way into download mode.)
|
||||
1. Wire as above, adapter unplugged: GND↔GND, 3V3↔3.3V, adapter TX↔IO3, adapter RX↔IO1.
|
||||
2. Jumper **IO0 to GND**. Then either hold **NRST to GND** for a second and release, or simply plug
|
||||
the adapter in (power-on with IO0 low = download mode). If the adapter has DTR/RTS wired to
|
||||
NRST and IO0, esptool can do this itself.
|
||||
3. Identify the port: `COMx` on Windows, `/dev/ttyUSB0` on Linux. On WSL, pass the device through
|
||||
or run from Windows.
|
||||
4. Run:
|
||||
|
||||
```
|
||||
esptool.py --port COM5 --baud 115200 chip_id
|
||||
esptool.py --port COM5 --baud 115200 chip-id
|
||||
```
|
||||
|
||||
5. If it connects, read the eFuses:
|
||||
@@ -66,6 +83,8 @@ esptool.py --port COM5 --baud 115200 chip_id
|
||||
espefuse.py --port COM5 summary
|
||||
```
|
||||
|
||||
6. Remove the IO0 jumper before a normal boot.
|
||||
|
||||
## Reading the result
|
||||
|
||||
**Open (Development SKU):**
|
||||
|
||||
Reference in New Issue
Block a user