Diag scans: 22 D1xx refuted, 21 xx session-locked; add diag raw toggle + scanner

- diag probe: `diag raw on|off` console command (mutes CANRAW during scans)
- tools/diag_scan.py: identifier-space sweeper via `diag bmw`
- findings: whole 22 D1xx block NRCs (clipping identifiers wrong for this
  DDE); 21 xx sparse - 21 20 = O_269962, measurement blocks gated behind
  diagnostic session / security access -> Launch capture is the path to
  live data
- wiki: route-b source page + obd-diagnostic-polling updated, raw scan logs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 16:02:18 +02:00
parent 7a7398243b
commit 61e190b1b9
9 changed files with 44738 additions and 3 deletions
+4
View File
@@ -97,3 +97,7 @@ The deferred test-day mission finally executed. `tools/diag_session.py` (new: on
## [2026-09-23] ingest | Route B verified, DTCs read, donor identified (E60 530d)
Second session of the day, no Launch needed. Extended the diag probe (read-only: mode 03 `diag dtc`, BMW KWP `diag ident` / `diag bmw` on 0x6F1 with a 1A/18/21/22 service whitelist; MAX_PAYLOAD 64->384). Results, all on the tapped bus: (1) `diag dtc` read the 5 stored codes - P0101 MAF, P0113 IAT, P0500 VSS, P0545 EGT, P0030 O2 heater - all disconnected-sensor swap leftovers; the "implausible MAF/IAT scaling" flags from the morning are withdrawn (sensor faults). (2) BMW addressing verified live: 0x6F1 [12] -> reply on 0x612; the google-ai clipping's reversed claim is dead. (3) `1A 86` ident (65 B): part numbers 7799764/7799765/7793887, date 2006-03, VIN prefix WBANC92090 -> E60 530d (unverified decode); 22 F190 rejected -> KWP2000 not UDS -> DDE6/EDC16-era. 1A 90 (full VIN) always answers busyRepeatRequest to single-shots. Wrote sources/diag-route-b-2026-09-23.md; updated obd-diagnostic-polling (Route B verified, warning callout resolved), open-questions #2 (donor mostly identified - part-number lookup remains) and #7 (DTCs read), bmw-m57n-engine; raw logs diag-20260923-1241*/1242*/1243*/1245*/1246*.log. Firmware change in src/modules/diag_probe.cpp+.h (design rule kept: still the single transmit path, human-typed, single-shot).
## [2026-09-23] ingest | Identifier scans: 22 D1xx dead, 21 xx session-locked
Third session. Added `diag raw on|off` (CANRAW mute) and tools/diag_scan.py (identifier-space sweeper). Scanned `22 D100-D1FF`: every DID NRC 0x12 - the google-ai clipping identifiers are confirmed wrong for this DDE. Scanned `21 00-FF`: hits only at 21 20 (ASCII " O_269962 " - Bosch SW ref candidate), 21 06/08 (byte 0x05), 21 10 (empty); refusals 21 90 busy / 21 91 conditions-not-correct / 21 F0 security-access-denied show the measurement blocks are gated behind a diagnostic session (10 xx) and partly security access (27) - both outside the read-only whitelist by design. Conclusion: blind Route B probing is exhausted; live data needs the capture-with-Launch session. Updated sources/diag-route-b-2026-09-23.md and obd-diagnostic-polling; raw logs diagscan-22D1-*.log + diagscan-21-*.log.
+1 -1
View File
@@ -64,7 +64,7 @@ The [[dwr-335d-torque-pids]] source is a worked, gauge-checked set of J1979 mode
## Route B — BMW proprietary (KWP2000 on `0x6F1` → `0x612`) — **VERIFIED WORKING (2026-09-23)**
First live exchange without any scan tool: `diag bmw 12 1A 86` → 65-byte multi-frame ident from `0x612`, containing DDE part numbers (7 799 764 / 7 799 765 / 7 793 887), a 2006-03 date, and the **VIN prefix `WBANC92090` → E60 530d** `(verified bytes / unverified decode)` — full breakdown in [[diag-route-b-2026-09-23]]. `22 F1 90` (UDS) is rejected: the DDE speaks **KWP2000, not UDS** — pointing at DDE6/EDC16. `1A 90` (full VIN) answers busyRepeatRequest to a single-shot probe. The `0x22 D1xx` live-data identifiers below remain untested — that is the remaining reason to capture with the Launch.
First live exchange without any scan tool: `diag bmw 12 1A 86` → 65-byte multi-frame ident from `0x612`, containing DDE part numbers (7 799 764 / 7 799 765 / 7 793 887), a 2006-03 date, and the **VIN prefix `WBANC92090` → E60 530d** `(verified bytes / unverified decode)` — full breakdown in [[diag-route-b-2026-09-23]]. `22 F1 90` (UDS) is rejected: the DDE speaks **KWP2000, not UDS** — pointing at DDE6/EDC16. `1A 90` (full VIN) answers busyRepeatRequest to a single-shot probe. **Same day, identifier scans**: the clipping's `22 D1xx` identifiers are confirmed wrong (whole block NRCs), and a `21 xx` sweep shows the measurement blocks are **gated behind a diagnostic session / security access** (NRC 0x22/0x33) — outside the probe's read-only whitelist by design. **Live data over Route B therefore requires the capture-with-Launch session below**, which will reveal the session setup and the real identifiers together.
This depends on the DDE variant, which is still open ([[open-questions]] #2, [[bmw-m57n-engine]]):
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+9 -1
View File
@@ -48,7 +48,15 @@ Parsed `(verified bytes; field meanings unverified)`:
- `1A 90` (dedicated VIN read) — NRC **0x21 busyRepeatRequest** on every try (ignition-only *and* engine running once); a single-shot probe won't get it (KWP expects the tester to retry, possibly within a session). Not needed — `1A 86` gave the prefix.
- `22 F1 90` (UDS-style VIN DID) — NRC 0x10: **not a UDS ECU**, KWP2000 only — another DDE6/EDC16-era hint `(unverified)`.
## Probe behaviour `(repo)`
## Third session: identifier scans — live data is session-locked
Engine idling, `tools/diag_scan.py` (new: sweeps an identifier space via `diag bmw`, CANRAW muted with the new `diag raw off`). Raw: `raw/diagscan-22D1-20260923-155515.log`, `raw/diagscan-21-20260923-155831.log`.
- **`22 D1 00`–`D1 FF`: nothing.** Every identifier NRCs 0x12 — the [[google-ai-dde7m57-pids]] clipping's `22 D1xx` identifiers (`D10C` boost etc.) are **confirmed wrong for this DDE** `(verified)`. (First scan ran with CANRAW on; its two "hits" are garbled NRC lines.)
- **`21 00`–`21 FF`: sparse.** Positive: `21 20` → ASCII **" O_269962 "** (Bosch software reference? — lookup candidate), `21 06`/`21 08` → one byte `05` each, `21 10` → empty reply. Many identifiers ACKed-but-silent.
- **The telling refusals:** `21 90` NRC 0x21 (busy), `21 91` NRC 0x22 (conditions not correct), `21 F0` NRC **0x33 security access denied**.
Conclusion `(verified behaviour, unverified interpretation)`: the DDE's measurement blocks exist but are **gated behind a diagnostic session** (KWP `10 xx` startDiagnosticSession, possibly plus `27` securityAccess for some) — both deliberately outside the probe's read-only whitelist. Blind probing has hit its safe limit; **the Launch capture is now the only sensible next step for live data**: it will reveal the session setup *and* the identifiers, and then replaying them is an informed decision instead of a guess.
Multi-frame TX flow control on `0x6F1` with extended addressing worked first try; `MAX_PAYLOAD` had to grow 64 → 384 (the first `1A 86` capture clipped at 192 mid-VIN). All requests single-shot, whitelisted read-only services (`1A`/`18`/`21`/`22`), zero TX failures once the bus was awake. Reminder from the first attempt of the day: **a silent bus (ignition off) shows up as "not ACKed by any node" + TWAI bus errors** — check ignition before suspecting wiring.