Files
ESP32-S3-Touch-LCD-5B/wiki/index.md
T
julian bb87b3d6da Decode the real CAN map: gear, temps, battery, driveline speeds
Ingest HeinrichG-V12/E65_ReverseEngineering (per-ID DBC-style docs with
worked examples) and re-analyse our own 2026-07-15 capture against it.
Resolves both outstanding scaling disputes, closes the engine-state
question, and adds the driveline speeds.

Resolved:
- Gearbox oil temp = raw - 40 (not offset 0, not +40). Source's worked
  example plus our own cross-check: the box read 31 C while coolant was
  at 37 C and climbing; offset 0 would have the transmission warming
  faster than the engine.
- Battery = 12-bit LE * 0.015 (0x3B4 U_BT); the E90 24-bit BE reading is
  wrong for us. The high nibble of byte 1 is ST_BTSW, not voltage.
- Engine was running during the 2026-07-15 capture (ST_ENGINE_RUN = 2 in
  397/397 frames), so its coolant trace is genuine warm-up data and the
  planned cold-start capture is unnecessary.
- Engaged gear = 0x1D2 byte 1, gear = (D1>>4)-4. No drive capture needed.

New signals (0x1A2 turbine, 0x0BA output shaft, 0x0AA RPM/pedal). Turbine
speed physically proves engagement: it free-spins at ~engine speed in P/N
and collapses to ~0 when the box loads up. Output shaft is the only
road-speed source on this bus - there is no DSC module - so it is the
feedback variable any future cruise-control work would need. Scaling is
uncalibrated; it is carried as raw counts with no physical unit.

Corrects three of my own earlier claims:
- 0x1D2 D1 is the engaged gear, not a "drive-gate flag" (it only ever
  showed two values because the car was stationary in 1st).
- 0x1D2 D4 0xF2 is a persistent Manual mode, not a "downshift event" - it
  holds across gears 2-6.
- 0x0BA was dismissed on the strength of D7, which is an alive counter.
  The gear is in D0's low nibble, and it is the only source of engaged
  reverse: 0x1D2 D1 stays 0x0F in R.

Firmware: real IDs replace the placeholder map (all 11-bit standard now,
so the extended-ID assumption is gone), full gear decode incl. Sport vs
Manual, and a debounced lever-vs-gearbox mismatch fault - the "lever says
R but the box never took it" case. Engine oil temp reads 0xFF here (sensor
not populated), so its valid flag is left clear rather than publishing
-207 C. Driveline speeds are kept out of automotive_data_t deliberately:
that struct is the UART wire format and widening it would break
Controller B.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 12:33:31 +02:00

3.0 KiB
Raw Blame History

type, updated
type updated
index 2026-07-17

Index

Catalog of every page in the wiki. Read this first when answering questions. Keep current on every change.

Entities

  • bmw-m57n-engine — the 3.0L BMW diesel whose CAN bus we read; E60/E65 donor (confirmed), DDE ECU, auto box with EGS on bus
  • nissan-patrol-swap — the target vehicle: Patrol receiving the M57N + BMW auto; the tapped bus is a BMW island in a Nissan
  • esp32-s3-touch-lcd-5b — Waveshare 5" display board (Controller A); onboard TJA1051 CAN transceiver, 7–36 V input, pinout, PSRAM/LCD gotchas

Concepts

  • can-bus-integration — the core challenge; current firmware ID map flagged as placeholder, verification plan
  • driveline-speed-signals — engine / turbine / output-shaft speeds: turbine speed as physical proof of gear engagement, and the output-shaft field that is our only road-speed source (no DSC on this bus) — the feedback variable for a future cruise-control PoC, with the safety envelope that would require
  • dual-controller-architecture — Controller A → UART 5Hz → Controller B (1.3" display); packet format

Synthesis

  • can-id-candidates — the E60/E65 CAN ID map — now decoded end-to-end: gear (lever + engaged + mode), coolant, gearbox temp (raw−40), battery (12-bit ×0.015), RPM, turbine speed, engine state all verified; placeholder IDs verified absent; fault codes and boost not passively broadcast
  • open-questions — the research frontier: bench-verify the candidate IDs, operating temp, transient protection, fault-code design decision

Sources

  • esp32-s3-touch-lcd-5b-waveshare-wiki — official Waveshare product wiki (ingested 2026-07-15); answered CAN-transceiver and power questions, raised the 0–65 °C operating-temp concern
  • e60-vfl-can-codes-xlsx — community E60 pre-facelift CAN table (ingested 2026-07-15); E60-specific confirmation of 0x1D0/0x3B4, new 0x304 gear-lever candidate
  • listen-and-send-pid-arduino — Arduino ELM327→E46-cluster sketch (ingested 2026-07-15); technique reference for a diagnostic-request fallback, not ID evidence
  • can-capture-2026-07-15 — first live CAN dump off the real swap bus (captured with the board's own logger); confirms 15 IDs incl. all four signal IDs, resolves the 0x1D2 gear encoding, verifies placeholder IDs absent; raw at raw/can-capture-2026-07-15-gearshift.csv
  • gear-box-can-revealings — gear fully decoded & VERIFIED (2026-07-16/17): 0x1D2 byte0 = lever, byte1 = engaged gear 1–6, byte4 = Drive/Sport/Manual mode; 0x0BA = the box's own target gear incl. reverse; raw at raw/gear_box_can_revealings.csv + raw/gearbox_engaged_gear.csv
  • e65-reverse-engineering-repo — E65 per-ID DBC-style docs (ingested 2026-07-17) — the highest-value source yet: settled the gearbox-temp offset (raw−40) and battery layout (12-bit ×0.015), proved the engine was running in our capture, and revealed turbine speed, output shaft, pedal position and cruise state