Files
ESP32-S3-Touch-LCD-5B/wiki/sources/can-capture-2026-10-18-patrol-2.md
T
julian 1cba9f30bc
Firmware / build (push) Successful in 10m49s
Reverse lights on DO0, Sport + Vehicle screens, per-DDE live data, ECU identification
- ReverseLight: isolated output DO0 (CH422G OC0 -> PC817 -> NPN sink) drives the
  reverse-lamp relay while the lever is in R on a live bus with ignition on; 10 Hz
  decision confirmed over 200 ms, written through the panel library's expander
  object so the backlight cannot undo it; `reverse status|on|off|force` console,
  default ON (NVS `revlight_en`). Wiki page reverse-lights-output with the wiring.
- Sport screen: BMW-style power + torque gauges (lv_meter on a dial-face image,
  image needle); PNG sources in assets/, tools/png2lvgl.py converter.
- Vehicle: final drive ratio + tyre circumference -> road speed, hp from torque;
  Settings > Vehicle page; `vehicle` console.
- Bench simulation (`sim` console) overlays torque / rpm / shaft on the snapshot.
- EcuIdent: KWP 1A 86 / 1A 80 read once, stored in NVS, shown on Settings >
  Vehicle, passive ECU CHANGED? check; `ecu` console.
- Ignition fallback from the 0x1D2 lever byte on buses without 0x3B4 (Patrol 2).
- Engine data: per-DDE `2C 10` identifier profiles (Patrol 1 vs Patrol 2
  rail 00C2 / boost 003A / battery 002F); DiagProbe liveConfigure().
- Wiki: Patrol 2 captures, vehicles page, obd identifier table per DDE, logs.
2026-10-28 16:46:42 +01:00

8.5 KiB
Raw Blame History

type, tags, updated
type tags updated
source
can-bus
capture
patrol-2
dde
ignition
kwp2000
ident
launch
rail-pressure
2026-10-18

CAN captures — the second Patrol, same M57N, "same" DDE (2026-10-18)

The user has a second Nissan Patrol with a BMW M57N and brought three CANNY 5.3 Pico logs (tab-separated, same format as launch-captures-2026-10-07): raw/ingnition-only.txt (14.5 s, 7 693 frames), raw/engine-on.txt (21.7 s, 11 657 frames) and raw/launch-diag-rail-pressure.txt (15.4 s, 8 971 frames, Launch connected). No malformed lines. Analysed offline against the firmware's own scalings. Headline: every frame the firmware decodes is byte-for-byte the same layout as on Patrol 1, but this bus has no 0x3B4, so the firmware's only ignition signal is missing — and the DDE is a different unit. This page is the evidence for vehicles.

What happened in each log (verified from the logs)

  • ignition-only: bus wakes at 0 s (EGS boot pattern on 0x0B5, 0x1D2 byte 0 = F0), lever reads E1 (P) from 1.0 s, key off at 10.6 s (0x1D2 byte 0 back to F0, 0x0A8 byte 7 bit 6 clears, 0x0AA byte 7 C8 → 00), bus still alive when the log ends at 14.5 s.
  • engine-on: key on at 0 s, crank at 5.8 s (0x1D0 run state 1, rpm 138–186, lever flicks E1→B4→E1 and 0x0BA target nibble 3→1→3 for 30 ms), idle 735–760 rpm from 7.5 s (run state 2), three throttle blips (pedal 14 / 51 / 68 %) to 1 551 rpm at 12–14.5 s, key off at 16.3 s, rpm decays to 0 by 18 s, bus alive to the end (21.7 s).
  • launch: engine idling 736–748 rpm in P, coolant 24→25 °C, the Launch polling one live value.

ID inventory against Patrol 1

ID Hz Patrol 1 (raw/boost.txt, 2026-10-07) Patrol 2 Note
0A8 0A9 0AA 100 yes yes DDE torque / rpm / pedal, same layouts
0B5 0BA 1A2 1D2 100 / 50 / 50 / 5 yes yes EGS, same layouts
1D0 10 yes yes DDE engine data, same
200 5 yes, constant 2C 81 FC yes, same unknown
492 498 592 598 5.5 / 0.2 yes yes network management style, unknown
1B6 1 → 10 constant 00 FC 00 04 00 F8 00 at 1 Hz FF FF 00 04-07 xx F0/F8 xx, speeds up to 10 Hz with the engine running unknown, changed
332 3B3 3B4 0.2 yes, every 5 s absent in all 51 s the 5-s trio from one transmitter is gone
38E 10 absent yes, 2 bytes, FF FF at wake-up then 00 00 unknown, new
612 6F1 — with the Launch with the Launch diagnostics

The same logger saw 0x3B4 on Patrol 1 at 0.2 Hz, so this is not a tool filter. Whatever module sent the trio on Patrol 1 is not on Patrol 2's bus → open-questions #15.

Every firmware-decoded signal matches (verified)

Signal Patrol 2 reads Plausible
0x0AA rpm (raw16 × 0.25) 0 key-on, 138–186 cranking, 735–760 idle, blips to 1 551 yes
0x0AA pedal 0 / 14 / 51 / 68 % yes
0x0A8 torque (TORQ_AVL) 25–30 Nm warm idle, negative on overrun; 812 Nm with key on, engine off (Patrol 1: 245 Nm) the engine-off value is junk → firmware now gates torque on run state (repo)
0x1A2 turbine (raw / 8 + 6) tracks rpm within 20 rpm in P yes
0x1D0 coolant (raw − 48) 23 → 25 °C, cold engine yes
0x1D0 run state (bits 20–21) 0 off, 1 cranking, 2 running yes
0x0B5 gearbox oil (raw − 40) 19 → 20 °C yes
0x1D2 lever E1 P, B4 N during the crank, F0 with the key off yes
0x0BA target nibble / output shaft 3 (P) / 0 yes, stationary

The DDE is a different unit (verified from the Launch's ident reads)

The Launch reads the KWP identification (6F1: 12 02 1A 80 → 612: F1 10 LL 5A 80 …) every cycle. Decoded (BCD part number at payload bytes 4–7, BCD date YY MM DD at 15–17; offsets observed, field names (unverified)):

Car 1A 80 reply length Part number Date Raw (after 5A 80)
Patrol 1 37 B 7796678 2006-02-16 00 00 07 79 66 78 00 00 00 11 4C 52 20 06 02 16 08 08 02 30 39 36 32 03 03 01 00 00 00 00 00 07 79 54 64 00
Patrol 2 31 B 7794904 2004-01-21 00 00 07 79 49 04 10 00 00 10 35 39 20 04 01 21 08 08 02 30 08 FF FF 02 03 01 00 00 00 FF

Patrol 1's 1A 86 block (read by our own probe, diag-route-b-2026-09-23) gives other numbers (7799764 / 7799765 / 7793887, 2006-03-07, VIN prefix WBANC92090) — 1A 80 and 1A 86 are different identification blocks of the same ECU. Same family, same broadcast layouts, same diagnostic behaviour; nothing in the decoding changes.

Ignition without 0x3B4 — the lever rule (verified timing on both logs)

0x1D2 byte 0 is F0 for the first second after wake-up and from the instant the key goes off, while the bus keeps running another 5–10 s (EGS/DDE after-run). With terminal 15 on it is a lever code (E1/D2/B4/78). On Patrol 1 F0 never appeared in any capture (always E1). So: a recognised lever code = ignition on, F0 = off, within one 200 ms frame. A second vote with the same behaviour on both cars: 0x0A8 byte 7 bit 6 (set ~3 s after wake-up while the key is on — 40/42/E0/E2 —, cleared at key-off). Not consistent across the cars: 0x0AA byte 7 (C8 with key on / engine off on Patrol 2, 00 on Patrol 1).

Firmware (repo, 2026-10-18): 0x3B4 keeps precedence while seen in the last 10 s, otherwise the lever rule decides; the driver logs which source decided.

The Launch dialogue — a new rail identifier (unverified meaning)

Every ~270 ms: 12 02 1A 80 → multi-frame ident, flow control 12 30 00 00, then 12 04 2C 10 00 C2 → F1 04 6C 10 HH LL. Raw 0x2B08–0x2C28 (11 016–11 304) at idle. At the verified 0xDF rail scale (× 0.03 bar) that is 330–339 bar, a normal idle rail pressure, so 00C2 is probably the rail setpoint or the Launch's other rail item — the user did not note the Launch's label/value this time. → obd-diagnostic-polling identifiers table, open-questions #15.

Bonus: a fuel counter on 0x1D0 (unverified)

Bytes 4–5 of 0x1D0 are a 16-bit counter that only advances with the engine running: ~400–500 counts/s at idle (0 → 5 433 over the engine-on log, flat before cranking and after key-off). Almost certainly the fuel-consumption counter (E65 docs name one on this ID) — a future fuel-rate readout once scaled against the Launch's consumption figure.

Consequences (repo, 2026-10-18)

  1. Ignition fallback from the 0x1D2 lever byte (above) — without it every live screen on Patrol 2 stays at "Ignition off".
  2. Torque gated on ENGINE_RUN_RUNNING on the Sport and Driveline screens (the key-on/engine-off junk value).
  3. EcuIdent: the DDE identification is read once (1A 86 then 1A 80), stored, shown on Settings → Vehicle (UNKNOWN ECU until then), re-read only on request; a connected Launch's 1A 80 reads are compared passively (ECU CHANGED?). Design: the identity is a label; behaviour adapts to which frames are present.
  4. One row per setup from now on: vehicles.
  5. Added the same evening, after the board's first key-on on this car (user report): the Engine data screen showed no rail pressure, boost flat at ~2800 mbar and a charge-air temperature above 300 °C, and the output speed stayed 0. The first three are Patrol 1's 2C 10 identifiers being read on a different DDE software — the Launch polled 00C2 here, not 00DF — so the live-data identifier set is now per DDE ((repo) engine_screen.cpp PROFILES[]): Patrol 2 gets rail 00C2 only until its other values are captured with the Launch. The output speed: all three logs here are stationary (0x0BA bytes 3–4 = 0 throughout), so a rolling capture is needed before calling the shaft field different on this EGS → open-questions #15. The board's own identification read worked on this unit: Settings → Vehicle showed DDE 7796156 - 2006-05-17 (the 1A 86 block; the Launch's 1A 80 reads 7794904 / 2004-01-21) — both numbers now select the Patrol 2 profile. ecu dump over USB the same evening: 1A 86 = 66 bytes, "@DR55820 ", 2006-05-17, parts 7796156 / 7796157 / 7789877, VIN prefix WBAGM21070 (E65 7-series); 1A 80 = 31 bytes, 7794904 / 2004-01-21 — this board's own 1A 80 is answered on this unit (it was silent on Patrol 1). Full bytes on vehicles.

vehicles · can-id-candidates · obd-diagnostic-polling · launch-captures-2026-10-07 · diag-route-b-2026-09-23 · nissan-patrol-swap · open-questions