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>
This commit is contained in:
2026-07-17 12:33:31 +02:00
parent 0a58afca9a
commit bb87b3d6da
13 changed files with 428331 additions and 132 deletions
+52 -27
View File
@@ -1,7 +1,7 @@
---
type: synthesis
tags: [can-bus, reverse-engineering, e60, research]
updated: 2026-07-16
updated: 2026-07-17
---
# E60/E65 CAN ID Candidates (Research Results)
@@ -15,7 +15,14 @@ Findings from the 2026-07-15 deep-research run (95 claims extracted from ~15 sou
> - `0x1D0` byte0 drifts up `0x55→0x58` = coolant warming (−48 scaling holds). **Oil temp `0x1D0` byte1 = `0xFF`** (not populated here).
> - `0x1D2` **gear fully VERIFIED** (2026-07-16, [[gear-box-can-revealings]]): byte0 `0xE1`=P/`0xD2`=R/`0xB4`=N/`0x78`=D — all codes match; byte4 splits D vs S/M and carries manual +/− shifts.
> - Absent despite being researched: `0x130`, `0x304`, `0x192`.
> - Still needs a **cold-start + confirmed-engine-running** capture to lock scaling on coolant/battery. See the source page for the full table.
> [!success] 2026-07-17 — [[e65-reverse-engineering-repo]] ingested: both disputes resolved, engine state closed
> A per-ID DBC-style source with worked examples on every page. Combined with re-analysis of our own capture:
> - **Gearbox oil temp offset RESOLVED → `raw − 40`** (not offset 0, not +40). Cross-checked against our coolant trace.
> - **Battery layout RESOLVED → 12-bit LE × 0.015** (the E65 reading; the E90 24-bit BE reading is wrong for us).
> - **Engine-run state CLOSED** — `0x1D0` bits 20–21 read "running" in 397/397 frames of the 2026-07-15 capture. That dump *was* a genuine warm-up trace, so **no cold-start capture is needed to trust the coolant scaling**.
> - **Engaged gear number RESOLVED** without a drive capture → `0x1D2` D1 high nibble ([[gear-box-can-revealings]]).
> - **New signals**: turbine speed (`0x1A2`), output shaft speed (`0x0BA` D3/D4), pedal position + cruise state (`0x0AA`) → [[driveline-speed-signals]].
## The map (replaces the firmware's placeholder IDs)
@@ -23,12 +30,19 @@ Findings from the 2026-07-15 deep-research run (95 claims extracted from ~15 sou
|--------|--------|-------|---------|--------|------|------------|
| Coolant temp | **0x1D0** | byte 0 | °C = raw − 48 | DME/DDE | 100 ms | **Very high** — verified verbatim in E65 docs, present in E90-gen DBC, confirmed live on a real E60 545i, E60 tool32 table lists 0x1D0 "Motordaten" from DDE1 (diesel!), and the [[e60-vfl-can-codes-xlsx]] sheet shows 0x7A→74 °C on a real E60 VFL (raw−48 checks out) |
| Engine oil temp | **0x1D0** | byte 1 | °C = raw − 48 | DME/DDE | 100 ms | **High** — same sources as coolant |
| Gearbox oil temp | **0x0B5** ("Torque_request_EGS") | byte 7 | ⚠ disputed: raw + 0 vs raw + 40 | EGS | ? | **Medium** — in the E9x community DBC; absent from the E65 repo's decoded EGS messages. Offset must be settled on the bench (a ~40 °C error is dangerous — resolve before trusting) |
| Gear lever position | **0x1D2** ("TransmissionDataDisplay") | **byte 0** | `0xE1`=P `0xD2`=R `0xB4`=N `0x78`=D/(S/M); split D vs S/M with byte 4 (`0xF0` auto / `0xF1` S-M) | EGS | 200 ms | **✅ VERIFIED on the swap bus 2026-07-16** — every code matches. Full decode: [[gear-box-can-revealings]] |
| Current gear number | **0x1D2** byte 1 upper nibble (GearAct, −4 offset) or **0x0BA** bits 0–3 (E65: values P/R/N…6th) | | | EGS | 20–200 ms | **Medium** — two candidate messages; also **0x304** "Gear lever" — the E60 VFL sheet shows a 2-byte lever message: P=0xE3, R=0xC2, N=0xD1, M=0xC9 (its D=0xC2 duplicates R — likely a sheet typo) |
| Battery voltage | **0x3B4** ("Powermanagement Batteriespannung") | ⚠ disputed layout | 12-bit LE × 0.015 V (E65, verified: 0x3D9→14.775 V) vs 24-bit BE × 0.001 V (E90 DBC) | Power module / DDE | 5 s (E65) | **High on ID** (E60 tool32 table + E60 VFL sheet: `64 F3`→12.76 V, consistent with the 12-bit LE layout though implying factor ≈0.0147 vs 0.015). Bonus from the sheet: byte 3 = engine running flag (0x09 on / 0x00 off) |
| Engine RPM (bonus) | **0x0AA** | bytes 4–5 | RPM = raw / 4 | DME/DDE | 10 ms | High — cross-generation (E65 + E90 comment) |
| Ignition/terminal status (bonus) | **0x130** | byte 0 bitmasks | 0xD5/0xC5/0xC1 | CAS | 100 ms | Medium — used by an M57 project as its only passive decode |
| Gearbox oil temp | **0x0B5** (`TEMP_GRB`) | byte 7 | **°C = raw − 40** | EGS | 10 ms | **✅ RESOLVED 2026-07-17** — [[e65-reverse-engineering-repo]] worked example (raw `0x43`=67 → 27 °C), plus our own cross-check: D7 `0x47`(71)→**31 °C** while coolant read 37 °C and climbing. Offset-0 would have the box at 71 °C with the engine at 37 °C — impossible for a warm-up |
| Gear lever position | **0x1D2** ("TransmissionDataDisplay") | **byte 0** | `0xE1`=P `0xD2`=R `0xB4`=N `0x78`=D/(S/M) | EGS | 200 ms | **✅ VERIFIED on the swap bus 2026-07-16** — every code matches. Full decode: [[gear-box-can-revealings]] |
| Gearbox mode | **0x1D2** | **byte 4** | `0xF0`=Drive(auto) `0xF1`=Sport `0xF2`=Manual | EGS | 200 ms | **✅ VERIFIED 2026-07-17** — `0xF2` is a *persistent mode*, not a downshift event (earlier claim corrected) |
| Engaged gear number | **0x1D2** | **byte 1** | `gear = (D1 >> 4) − 4`; `0x0F` = none (P/R/N) | EGS | 200 ms | **✅ VERIFIED 2026-07-17** — clean +16 ladder across gears 1–6, identical in D and M/S ([[gear-box-can-revealings]]). **Never set for R** |
| Engaged gear **incl. reverse** | **0x0BA** (`ST_GR_GRB`) | byte 0 low nibble | `1`=N `2`=**R** `3`=P `5`–`A`=1st–6th `0xF`=invalid | EGS | 20 ms | **✅ VERIFIED 2026-07-17** for 1/2/3/5 against our capture; 6–A inferred. **The only source of engaged reverse** — `0x1D2` D1 is blind to it |
| Battery voltage | **0x3B4** (`U_BT`) | bits 0–11 | **`((D1 & 0x0F) << 8 \| D0) × 0.015` V** | Power module | 5 s | **✅ RESOLVED 2026-07-17** — 12-bit LE × 0.015 confirmed by [[e65-reverse-engineering-repo]] worked example (`0x3D9`→14.775 V). The E90 24-bit BE × 0.001 reading is **wrong for us**. Bonus: `ENG_ST` bits 16–19 |
| Engine RPM | **0x0AA** (`RPM_ENG`) | bits 32–47 | **`(D4 + D5×256) × 0.25`** 1/min | DME/DDE | 10 ms | **✅ VERIFIED 2026-07-17** — 679–684 rpm at idle on our capture, matching `RPM_IDLE_TARGET`=700 from `0x1D0` |
| **Turbine speed** | **0x1A2** (`RPM_GRB_TURB`) | bits 0–15 | **`(D0 + D1×256) × 0.125 + 6`** 1/min | EGS | 20 ms | **✅ VERIFIED 2026-07-17** — physical proof of gear engagement; collapses ~630→~0 when the box engages. → [[driveline-speed-signals]] |
| **Output shaft speed** | **0x0BA** | bits 20–39 (D3/D4) | ⚠ **uncalibrated** | EGS | 20 ms | 🔬 **Hypothesis, strong** — undocumented in the source repo; zero in every stationary frame incl. engaged-in-D, non-zero once wheels turn. **Our only road-speed signal** (no DSC on this bus) → [[driveline-speed-signals]] |
| Engine run state | **0x1D0** (`ST_ENGINE_RUN`) | bits 20–21 | `0`=off `1`=starting `2`=running `3`=invalid | DME/DDE | 100 ms | **✅ VERIFIED 2026-07-17** — read 2 ("running") in 397/397 frames of the 2026-07-15 capture |
| Pedal position / cruise state | **0x0AA** | `ANG_ACPD` bits 24–31 (×0.39063 %); `ST_CLCTR_V` bits 52–55 | see [[driveline-speed-signals]] | DME/DDE | 10 ms | (source: [[e65-reverse-engineering-repo]]) — relevant to a cruise-control PoC |
| Gearbox cooling demand | **0x0B5** (`ST_OTMP_GRB`) | bits 38–39 | `0`=none `1`=stage 1 `2`=stage 2 `3`=invalid | EGS | 10 ms | (source: [[e65-reverse-engineering-repo]]) — the box's own overheat opinion; better display warning than a raw threshold |
| Ignition/terminal status | **0x130** | byte 0 bitmasks | 0xD5/0xC5/0xC1 | CAS | 100 ms | **Absent from our bus** (verified 2026-07-15) — CAS not retained in the swap |
### The 0x1D2 encoding dispute — ✅ RESOLVED on the swap bus (2026-07-16)
@@ -37,30 +51,39 @@ The live lever capture ([[gear-box-can-revealings]]) settles it — **DLC 6**, w
| Byte | Meaning | Values |
|------|---------|--------|
| **0** | **Lever position** | `0xE1`=P, `0xD2`=R, `0xB4`=N, `0x78`=D **and** S/M |
| 1 | Drive-gate flag | `0x0F` in P/R/N, `0x5F` in D + S/M |
| **1** | **Engaged gear** | `gear = (D1 >> 4) − 4`; `0x0F` = none (P/R/N). Never set for R |
| 2 | unused | `0xFF` |
| 3 | Rolling counter | fluctuates — ignore (matches the predicted byte-3 counter) |
| **4** | **Mode / manual shift** | `0xF0`=Drive(auto), `0xF1`=Sport/Manual, `0xF2`=downshift (−); up-shift (+) unconfirmed |
| **4** | **Mode** | `0xF0`=Drive(auto), `0xF1`=Sport, `0xF2`=Manual |
| 5 | unused | `0xFF` |
Byte 0 alone gives P/R/N/D; byte 4 splits **D vs S/M** (Steptronic side-gate) and carries the manual +/− nudges. The old "dispute" was just notation — the E65 whole-byte values and the E90 low-nibble scheme agree (`0xE1` low nibble = 1 = P, etc.), and this bus speaks the whole-byte/DLC-6 dialect.
Byte 0 alone gives P/R/N/D; byte 4 splits **D vs S vs M**; byte 1 gives the engaged gear 1–6. The old "dispute" was just notation — the E65 whole-byte values and the E90 low-nibble scheme agree (`0xE1` low nibble = 1 = P, etc.), and this bus speaks the whole-byte/DLC-6 dialect.
> The firmware's `automotive_data.h` gear map should be rewritten to `0x1D2` byte 0 (+ byte 4 for S/M). → [[can-bus-integration]]
> [!warning] Two 2026-07-16 labels on this page were wrong — corrected 2026-07-17
> - **D1 was called a "drive-gate flag"**. It is the **engaged gear number**; it only ever showed two values because the vehicle was stationary in 1st. This also means the "engaged gear needs a drive capture" task was never real — a per-detent capture sufficed.
> - **D4 `0xF2` was called "downshift (−)"**, a transient event. It is a **persistent Manual-mode flag** — it holds across gears 2–6. The `+`/`−` nudges have no distinct code; they merely promote Sport → Manual. The old "up-shift (+) value unconfirmed" question therefore dissolves rather than being answered.
>
> Both errors came from over-reading a two-value field as a boolean. Full evidence: [[gear-box-can-revealings]].
> Note `0x1D2` is where **our decode is ahead of the published source**: [[e65-reverse-engineering-repo]] lists `0x1D2` as "Display Gearbox Data" with an **empty signal table** — it never decoded it. Its sample frame (`E1 0C 8F 7C F0 FF`) does independently confirm `0xE1`=P.
> The firmware's `automotive_data.h` gear map should be rewritten to `0x1D2` byte 0 + byte 1 + byte 4, with `0x0BA` for engaged reverse. → [[can-bus-integration]]
## Field checklist for the live capture session
Setup: 500 kbps, board's 120 Ω termination switch **OFF**, common ground with the vehicle, tap CAN-H/CAN-L on the PT-CAN. (Note: the firmware runs `TWAI_MODE_NORMAL` and ACKs the bus — not listen-only — see [[can-bus-integration]].) **Log everything raw for the whole session** and save the dump into `wiki/raw/` — even IDs we don't care about yet.
Setup notes still apply. **Most of the original checklist is now done** — gear (lever, engaged, mode), coolant, gearbox temp, battery, RPM, engine state are all resolved. What remains:
| Test | Watch | Confirms |
|------|-------|----------|
| Ignition on, engine off | `0x130` byte 0 changes per key position; `0x3B4` appears (~every 5 s) | Terminal status; battery message alive |
| Compare `0x3B4` to a multimeter at the battery | Try 12-bit LE ×0.015 and ×0.0147 vs meter (engine off ≈12.4 V, running ≈14+ V); check byte 3 flips 0x00→0x09 on start | Battery layout + factor; engine-running flag |
| Cold start, note ambient temp | `0x1D0` byte 0 ≈ ambient+48 raw, then climbs steadily to ~90 °C (raw ~0x8A) | Coolant ID + −48 scaling |
| Same, byte 1 | Should ALSO start near ambient but climb **slower** than byte 0 and lag behind | Oil temp really is byte 1 (weakest engine signal) |
| Cold start | `0x0B5` byte 7: if raw ≈ ambient → offset 0; if raw ≈ ambient+40… i.e. reads 40 under ambient with offset 0 assumed → offset +40 | Gearbox temp offset dispute (cold start makes the two hypotheses ~40 apart — unmistakable) |
| Hold brake, shift P→R→N→D→(S/M) slowly | `0x1D2` byte 0 (note DLC: 5 vs 6!); `0x304` bytes; `0x0BA` bits 0–3 | Gear lever encoding + which message to use; settles the D=R typo in the E60 sheet |
| Drive: let the box shift 1→2→3… | `0x1D2` byte 1 upper nibble, `0x0BA` low nibble increments per shift | Current gear number source |
| Blip throttle | `0x0AA` bytes 4–5 = RPM×4 | RPM sanity check (fast cross-check that you're on the right bus) |
| **Wheels lifted, steady speed in D; step 1st→6th** | `0x0BA` D3/D4 vs `0x1A2` turbine vs `0x0AA` RPM, logged together | **Output-shaft scaling.** Turbine ÷ output at each gear should reproduce the 6HP26 ratios — a built-in self-check. → [[driveline-speed-signals]] |
| Compare `0x3B4` to a multimeter at the battery | `((D1 & 0x0F) << 8 \| D0) × 0.015` vs meter (engine off ≈12.4 V, running ≈14+ V) | Battery factor — layout is settled, this is a sanity pass only |
| Cross-check `0x0B5` D7 − 40 against the Launch's gearbox oil temp readout | Expect agreement within a degree | Confirmatory only — offset already settled two ways |
| Lever to R **on the ground**, brake released | `0x1A2` turbine ÷ `0x0AA` RPM ratio | The engagement test for the "lever says R but nothing happens" fault → [[driveline-speed-signals]] |
| Engage cruise (if the donor's stalk is wired) | `0x0AA` `ST_CLCTR_V` bits 52–55 → `0x4`–`0x7` | Whether the DME's CC regulator is live on this swap |
If an expected ID is absent entirely, note it — it means the swap harness dropped that module's traffic, which is itself an answer ([[open-questions]] #3).
Absent IDs are themselves answers — `0x130`/`0x304`/`0x192` and the whole DSC group (`0x0CE`/`0x19E`/`0x1A0`) never appear, meaning CAS and DSC aren't on the swap bus ([[open-questions]] #3).
## Fault codes: passive reading is NOT possible ⚠
@@ -77,9 +100,9 @@ Also useful: an E60 forum claim `(unverified)` that arbitration IDs are identica
## Sources
- [[e65-reverse-engineering-repo]] — **E65/E66 per-ID DBC-style docs (ingested 2026-07-17)** — the highest-value source found so far: resolved the gearbox-temp offset and battery layout, closed the engine-state question, and supplied turbine speed, output shaft, pedal position and cruise state. Caveat: petrol MED 9.2.1 donor, not M57N diesel
- [[e60-vfl-can-codes-xlsx]] — **E60 VFL community spreadsheet (ingested)**: E60-specific confirmation of 0x1D0 (−48 scaling), 0x3B4, 0x1D2 DLC 6; adds 0x304 gear lever; contains NO oil-temp or gearbox-temp rows
- [[listen-and-send-pid-arduino]] — technique reference (ingested): ELM327 PID-request pattern for the fault-code fallback; E46 cluster frames, not E60 evidence
- `HeinrichG-V12/E65_ReverseEngineering` (GitHub) — E65 760Li PT-CAN, docs verified verbatim by the adversarial pass (0x1D0, 0x3B4, 0x192, 0x1D2, 0x0BA, 0x1A2)
- `damienmaguire/BMW-E65-CANBUS` (GitHub) — live E65 735i captures + working EGS emulator code (0x1D2 encoding, 0x192, 0x0AA)
- `TimesNewRomanZ/e60-canbus` (GitHub, community `bmw_e9x_e8x.dbc`) — author runs a real E60 545i; 0x1D0 confirmed live on E60
- `kmalinich/dieslg8` (GitHub) — M57 diesel (E90 335d, EDC17): diagnostic-request-only coolant/DTC evidence
@@ -89,11 +112,13 @@ Also useful: an E60 forum claim `(unverified)` that arbitration IDs are identica
## Caveats
- No source used an actual **E60 M57N diesel** end-to-end; the closest anchors are the E60 tool32 table (lists DDE1 as sender for 0x1D0/0x3B4), the E60 VFL spreadsheet (real pre-facelift E60, engine variant unknown), and the M57 dieslg8 project (different chassis generation). Engine-side layouts are inferred from petrol DME captures of the same bus generation.
- **Oil temp and gearbox oil temp remain the weakest signals** — absent from both E60-specific sources; only the E9x DBC and E65 docs place oil temp at 0x1D0 byte 1, and only the E9x DBC has gearbox temp (0x0B5 byte 7, offset disputed).
- Firmware's current IDs (`0x4F`, `0x55`, `0x201`, `0x1001`, `0x101F`) are contradicted by every source AND **confirmed absent from the live bus** (verified, 2026-07-15) — definitively placeholders. → [[can-bus-integration]]
- Promotion to `(verified)` requires a live capture from the swap's bus: warm the engine and watch 0x1D0 byte 0 climb, shift through P/R/N/D and watch 0x1D2. **Partially done** 2026-07-15 ([[can-capture-2026-07-15]]): IDs + 0x1D2 gear codes verified; coolant/battery scaling still needs a cold-start capture with confirmed engine state.
- No source used an actual **E60 M57N diesel** end-to-end; the closest anchors are the E60 tool32 table (lists DDE1 as sender for 0x1D0/0x3B4), the E60 VFL spreadsheet, and the M57 dieslg8 project. Engine-side layouts are inferred from petrol DME captures of the same bus generation. **Mitigating evidence (2026-07-17)**: every signal from the petrol-donor [[e65-reverse-engineering-repo]] that we checked against our own bus decoded to physically sensible values first try — coolant, gearbox temp, RPM, turbine speed, engine state, gear. The layouts evidently carry.
- **Engine oil temp is now the only dead signal**: `0x1D0` byte 1 reads `0xFF` on our bus — the sensor isn't populated on this M57N. Not a decode error; there is nothing to read. The UART packet's `engine_oil_temp` field has no source.
- **`AIP_ENG` (`0x1D0` byte 3) is barometric, not boost** — 8 bits ×2 +598 caps at 1108 hPa; a boosting M57N reaches ~2500 hPa absolute. Manifold boost is **not broadcast**; the Launch polls for it. → [[obd-diagnostic-polling]]
- Firmware's original IDs (`0x4F`, `0x55`, `0x201`, `0x1001`, `0x101F`) are contradicted by every source AND **confirmed absent from the live bus** (verified, 2026-07-15) — definitively placeholders. → [[can-bus-integration]]
- **The cold-start capture is no longer needed.** It was on the list only because the 2026-07-15 engine state was unknown; `ST_ENGINE_RUN` = running in 397/397 frames settles that, making the coolant trace a genuine warm-up and its −48 scaling trustworthy.
- Remaining `(unverified)`: `0x0BA` `ST_GR_GRB` values 6–A (2nd–6th, inferred from the parallel `0x1D2` ladder), and the `0x0BA` D3/D4 output-shaft **scaling**. → [[driveline-speed-signals]]
## Related
[[can-bus-integration]] · [[bmw-m57n-engine]] · [[nissan-patrol-swap]] · [[open-questions]]
[[can-bus-integration]] · [[driveline-speed-signals]] · [[e65-reverse-engineering-repo]] · [[gear-box-can-revealings]] · [[bmw-m57n-engine]] · [[nissan-patrol-swap]] · [[open-questions]]
+137
View File
@@ -0,0 +1,137 @@
---
type: concept
tags: [can-bus, egs, dde, speed, gear, cruise-control, verified]
updated: 2026-07-17
---
# Driveline Speed Signals
The three rotating speeds our bus exposes — **engine**, **turbine (gearbox input)**, and **output shaft** — and why they matter well beyond the gear display. Together they give (a) a physical proof of gear engagement that no status byte can provide, and (b) the feedback variable a **cruise-control proof of concept** would be built on.
> [!important] Why this page exists
> The swap bus carries **no DSC module** — the 2026-07-15 capture found 15 IDs and *none* of the chassis/stability IDs (`0x0CE`, `0x19E`, `0x1A0`) the [[e65-reverse-engineering-repo]] documents. **There is no wheel-speed message on this bus.** So the gearbox's own shaft speeds are not a nice-to-have — they are the *only* road-speed information available to us. Anything speed-dependent this project ever does, including cruise control, has to come from here.
## The three speeds
| What | ID | Bytes | Decode | Status |
|---|---|---|---|---|
| **Engine RPM** | `0x0AA` `RPM_ENG` | bits 32–47 | `(D4 + D5×256) × 0.25` 1/min | ✅ **verified** — 679–684 at idle |
| **Turbine (input)** | `0x1A2` `RPM_GRB_TURB` | bits 0–15 | `(D0 + D1×256) × 0.125 + 6` 1/min | ✅ **verified** — see below |
| **Output shaft** | `0x0BA` bits 20–39 | D3/D4 | ⚠ **uncalibrated** | 🔬 **hypothesis** — see below |
`0x1A2` is DLC 4 @ 20 ms; `0x0AA` is DLC 8 @ 10 ms; `0x0BA` is DLC 8 @ 20 ms. All three are fast — good for a control loop.
> [!note] Do not use `GRDT_REIN` (`0x0BA` bits 8–19)
> The repo documents it as a gearbox speed (×0.125 1/min), but on **our** bus it reads `0xFFE`/`0xFFF` — the invalid marker — across every frame of both captures. Not populated here. `0x1A2` is the turbine source that works. (verified, 2026-07-17)
## Turbine speed = physical proof of engagement ✅
The single most useful thing this ingest produced. Correlating `0x1A2` against lever position across the 2026-07-15 capture (engine idling ~680 rpm, vehicle stationary on its brakes):
| Lever | Frames | Turbine min | **avg** | max |
|---|---|---|---|---|
| P | 1370 | 6 | **634** | 652 |
| N | 95 | 6 | **628** | 649 |
| **D** | 458 | 6 | **70** | 652 |
| **R** | 2 | 6 | **~0** | 6 |
(verified, 2026-07-17 — derived from `raw/can-capture-2026-07-15-gearshift.csv`)
This is textbook torque-converter behaviour and it is unambiguous:
- **P/N** — nothing is engaged, so the turbine free-spins at roughly engine speed (~630 vs ~680; the gap is normal converter slip).
- **D/R** — the box engages, the output shaft is held by the brakes, and the turbine **stalls to near zero**.
The D column's `max` of 652 and the wide min/max spread are just the transition frames as the lever passed through — the *average* tells the story.
### Why this beats every status byte
`ST_GR_GRB` (`0x0BA`) tells you what the gearbox **intends**. `0x1D2` D0 tells you what the driver **selected**. Neither is proof that anything mechanically happened. **Turbine speed is a physical measurement of load** — the box can't fake it.
**The engagement test** is the *ratio* of turbine to engine speed, not the absolute value:
```
ratio = RPM_GRB_TURB (0x1A2) / RPM_ENG (0x0AA)
ratio ≈ 1.0 → turbine free-spinning → NOT engaged (normal in P/N)
ratio ≈ 0 → turbine stalled/loaded → engaged, output held
0 < ratio < 1 → engaged and moving (converter slip under load)
```
This directly answers the UX problem that motivated the search — *"lever says R but the car isn't moving."* With the vehicle on the ground and the brake released:
- lever = R, **ratio ≈ 0 or climbing from 0** → box engaged, it's working
- lever = R, **ratio ≈ 1.0** → **the box never took the request** ⚠ this is the fault to surface
> [!warning] The ratio is only meaningful under known output conditions
> On a **lift with the wheels free**, an engaged box spins the wheels up until the turbine approaches engine speed again — so `ratio ≈ 1.0` is normal there and does **not** indicate a fault. The test is only valid when the output is loaded (on the ground). Any firmware use of this must gate on output-shaft speed ≈ 0, or the display will cry wolf every time the car is jacked up.
## Output shaft speed — the cruise-control variable 🔬
`0x0BA` bits **20–39** (D2 high nibble, D3, D4) are a **gap in the published source** — the [[e65-reverse-engineering-repo]] table jumps from `GRDT_REIN` at bit 19 straight to the checksum at bit 40. Its own E65 example leaves those bytes zero. **Our bus populates them.**
Evidence that they are an output-shaft/road-speed field (verified, 2026-07-17):
| Condition | D3 | D4 | Turbine | Interpretation |
|---|---|---|---|---|
| P — stationary | `00` | `00` | ~634 | output stopped |
| N — stationary | `00` | `00` | ~628 | output stopped |
| **D — stationary, brakes on** | `00` | `00` | **~70** | engaged but **output held** → zero |
| **R — wheels lifted & turning** | `A8` | `01` | — | **output turning → non-zero** |
The field is zero in *every* stationary frame **including engaged-in-D**, and non-zero the moment the wheels actually rotate. That decouples it from engine, turbine, and gear state — it tracks the **output shaft** and nothing else. Which is exactly the definition of road speed, minus a diff ratio and a tyre circumference.
Read as 16-bit Intel at bit 24: `0x01A8` = 424. At the ×0.125 factor its neighbours use, ~53 rpm — plausible for lifted wheels idling in R, but **the scaling is a guess off a single snapshot and must not be trusted yet.**
### Calibrating it (the next capture)
1. Wheels lifted, hold a steady speed in **D**, log `0x0BA` + `0x1A2` + `0x0AA` together.
2. Step through 1st→6th if the box will shift, recording D3/D4 at each. Turbine ÷ output at each gear should reproduce the **6HP26 gear ratios** — which is a self-check: if the ratios come out right, the scaling is right.
3. `6HP26.pdf` lives in the source repo's `docs/` and gives those ratios. → [[open-questions]] wishlist.
4. Cross-check against the Launch's road-speed readout if it exposes one. → [[obd-diagnostic-polling]]
Getting from output-shaft rpm to km/h needs the **final drive ratio and tyre size of the Patrol**, not the donor — a swap-specific number nobody has written down yet. → [[nissan-patrol-swap]]
## Cruise control: what the bus already gives us
The DME publishes its own cruise/ACC regulation state. `0x0AA` `ST_CLCTR_V` (bits 52–55):
| Value | Meaning |
|---|---|
| `0x0` | ACC regulation, pedal not pressed |
| `0x1` | ACC regulation, pedal pressed |
| `0x4` | **CC regulation, retard** |
| `0x5` | **CC regulation, constant speed** |
| `0x6` | **CC regulation, recall** |
| `0x7` | **CC regulation, speed up** |
| `0x8` | Pedal not pressed |
| `0x9` | Pedal pressed |
| `0xA` | Pedal transgress |
| `0xB` | Pedal kickdown |
(source: [[e65-reverse-engineering-repo]]. Our capture reads `0x0` on all 3835 frames — pedal untouched, consistent with a stationary idling test. (verified, 2026-07-17))
Also available: **`ANG_ACPD`** (`0x0AA` bits 24–31, ×0.39063 %) — accelerator pedal position, `0x00` unpressed → `0xFF` floored. And **`TORQ_DVCH`** (bits 12–23, signed ×0.5 Nm) — driver-demand torque.
### Why a PoC is architecturally plausible
The E65 powertrain is built around **external modules requesting torque from the DME** — that is precisely what `0x0B5` ("Torque Request EGS") is, and what `0x0BA`'s repo title ("Torque Request ACC") points at. The DME arbitrates requests from the EGS, from ACC, and from itself; `ST_CLCTR_V` is it *reporting which regulator currently has the ball*. So the plumbing for "another module asks the engine for torque" is native to this bus, not something we'd have to invent.
A PoC would then need:
- **Feedback**: output shaft speed (`0x0BA` D3/D4) — *the only road-speed source we have* ⬅ the reason this page exists
- **Actual/limits**: `RPM_ENG`, `ANG_ACPD` (driver override — pedal press must instantly disengage)
- **Engagement sanity**: turbine ratio, so it can't regulate against a box in N
- **Actuation**: a torque-request frame the DME accepts
> [!danger] Actuation is a different category of risk from everything so far
> Every capability in this project to date is **read-only**. A cruise-control PoC **transmits frames that command engine torque**. Getting the ID, scaling, checksum, or alive counter wrong doesn't produce a bad reading — it produces **unintended acceleration**. Additional hazards specific to our situation:
> - The board already runs `TWAI_MODE_NORMAL` and ACKs the bus, so transmit is one function call away — there is **no accidental-write safety margin** left. → [[can-bus-integration]]
> - `0x0B5`/`0x0BA` carry **checksums and alive counters**; the DME rejects (and may fault on) malformed requests. Both algorithms are unknown to us.
> - The swap has **no DSC and no brake-pedal switch on the bus** we've found — so the usual "brake cancels cruise" interlock has no source. A PoC would have no independent way to know the driver is braking.
>
> Treat this as a **bench/lifted-wheels-only** exercise until every one of those is resolved. Nothing here should be enabled on a moving vehicle on the strength of a wiki page.
## Related
[[e65-reverse-engineering-repo]] · [[can-id-candidates]] · [[gear-box-can-revealings]] · [[can-bus-integration]] · [[nissan-patrol-swap]] · [[open-questions]]
+24 -5
View File
@@ -1,7 +1,7 @@
---
type: synthesis
tags: [meta, todo]
updated: 2026-07-16
updated: 2026-07-17
---
# Open Questions
@@ -10,7 +10,15 @@ The research frontier. Answering any of these should trigger updates across the
## Blocking
1. **What are the real CAN IDs for the E60/E65-generation M57N data we want?** *Largely answered 2026-07-15.* Research produced the map and the **first live capture confirmed it** ([[can-capture-2026-07-15]]): `0x1D0` (coolant), `0x1D2` (gear, encoding resolved), `0x0B5`, `0x3B4` all live; placeholder IDs confirmed absent. **Remaining:** a cold-start + confirmed-engine-running capture to lock coolant/battery *scaling* (first capture's engine state was unconfirmed; battery + oil-temp bytes were dormant/`0xFF`). → [[can-bus-integration]]
*(Nothing is blocking as of 2026-07-17 — the CAN map is decoded end-to-end. See #8 for the one live calibration left.)*
## Active
8. **What is the scaling of `0x0BA` D3/D4 (output shaft speed)?** The field is undocumented in every source; we know it's zero when the output is held and non-zero when the wheels turn, but not what a count is worth. **This is the project's only road-speed signal** — there is no DSC/wheel-speed module on the swap bus — so anything speed-dependent (notably a cruise-control PoC) waits on this. Calibrate by logging `0x0BA` + `0x1A2` + `0x0AA` at steady speed through gears 1–6; turbine ÷ output should reproduce the 6HP26 ratios as a self-check. → [[driveline-speed-signals]]
9. **Is a cruise-control PoC worth pursuing, and under what safety envelope?** The bus architecture supports it natively (the DME arbitrates torque requests from the EGS and ACC; `ST_CLCTR_V` reports which regulator has control). But actuation means **transmitting frames that command engine torque**, with unknown checksum/alive-counter algorithms and **no brake-pedal signal on this bus** to build the standard cancel interlock from. Design decision, not a research question. → [[driveline-speed-signals]]
10. **What are the Patrol's final drive ratio and tyre size?** Needed to turn output-shaft rpm into road speed. Swap-specific — not in any donor documentation. → [[nissan-patrol-swap]]
## Project context
@@ -22,10 +30,18 @@ The research frontier. Answering any of these should trigger updates across the
5. **Operating temperature 0–65 °C** (source: waveshare-wiki) — outside automotive norms at both ends (sub-zero winter cabins, sun-baked dashboards). Is the mounting location temperature-controlled enough? Any mitigation (mounting away from vents/sun, accepting reduced lifespan)?
6. **Transient protection on the 7–36 V input**: the board takes vehicle 12 V directly, but ISO 7637 load-dump spikes can exceed 36 V `(unverified)`. Consider an upstream TVS diode / automotive-rated buck. Also: ignition-switched vs constant power (the isolated digital input could sense ignition).
7. **Fault codes**: the UART packet reserves a field for fault codes — DDE fault codes are read via diagnostic protocols (KWP2000/UDS over K-line or CAN), not passively broadcast. Is passive reading even possible? `(unverified)`
7. **Fault codes**: the UART packet reserves a field for fault codes — DDE fault codes are read via diagnostic protocols (KWP2000/UDS over K-line or CAN), not passively broadcast. Is passive reading even possible? `(unverified)` — **update 2026-07-17**: the same barrier explains why the Launch scanner shows boost/gearbox data our dump lacks (it polls; nothing broadcasts them). A capture *while the Launch is connected* would record both request and reply frames, handing us the exact bytes to replay. → [[obd-diagnostic-polling]]
## Answered
- ~~Was the engine actually running during the 2026-07-15 capture?~~ → **Yes** — `0x1D0` `ST_ENGINE_RUN` = 2 ("running") in **397/397 frames** (verified, 2026-07-17). The coolant trace is genuine warm-up data; **the cold-start capture that was blocking #1 is no longer needed.** → [[e65-reverse-engineering-repo]]
- ~~Gearbox oil temp offset: 0 or +40?~~ → **Neither — `raw − 40`** (verified two ways, 2026-07-17): the source's worked example, plus our own gearbox-at-31 °C vs coolant-at-37 °C warm-up cross-check. → [[e65-reverse-engineering-repo]]
- ~~Battery voltage layout: 12-bit LE ×0.015 or 24-bit BE ×0.001?~~ → **12-bit LE × 0.015** (source: E65 repo worked example `0x3D9`→14.775 V, 2026-07-17).
- ~~What is the actual engaged gear number, and does it need a drive capture?~~ → **`0x1D2` D1**, `gear = (D1>>4)−4`. **No drive capture needed** — a per-detent capture sufficed. (verified, 2026-07-17) → [[gear-box-can-revealings]]
- ~~What is the manual up-shift (+) value on `0x1D2` D4?~~ → **The question was malformed.** D4 is a persistent *mode* (`0xF0` auto / `0xF1` Sport / `0xF2` Manual), not a shift-event field; `+` and `−` have no distinct codes. (verified, 2026-07-17)
- ~~Is engaged **reverse** observable?~~ → **Yes, but not on `0x1D2`** (D1 stays `0x0F` in R). Use **`0x0BA` `ST_GR_GRB` = 2**. For physical proof of engagement, use turbine speed. (verified, 2026-07-17) → [[driveline-speed-signals]]
- ~~Is boost passively broadcast?~~ → **No.** `0x1D0` `AIP_ENG` is barometric (caps at 1108 hPa vs ~2500 needed). Diagnostic polling only. (2026-07-17)
- ~~Which donor vehicle?~~ → **E60/E65 (2003+)** (verified — user, 2026-07-15) → [[bmw-m57n-engine]]
- ~~Is the EGS on the bus?~~ → **Yes — BMW auto with EGS wired in**; gearbox temp and gear position have a real source. (verified — user, 2026-07-15)
- ~~Is the target a Nissan Patrol?~~ → **Yes.** (verified — user, 2026-07-15) → [[nissan-patrol-swap]]
@@ -38,5 +54,8 @@ The research frontier. Answering any of these should trigger updates across the
- ~~Waveshare product page~~ ✅ ingested → [[esp32-s3-touch-lcd-5b-waveshare-wiki]]
- Waveshare **schematic PDF** (linked from the product page: `ESP32-S3-Touch-LCD-5-Sch.pdf`) — would confirm CAN GPIO routing and power path
- A community DBC / CAN-ID list for the donor platform
- A real candump log from the engine running
- ~~A community DBC / CAN-ID list for the donor platform~~ ✅ ingested → [[e65-reverse-engineering-repo]]
- ~~A real candump log from the engine running~~ ✅ → [[can-capture-2026-07-15]] (engine confirmed running, 2026-07-17)
- **`6HP26.pdf`** — sitting in the E65 repo's `docs/`. The ZF 6HP26 manual, very likely our exact gearbox: gear ratios would let us convert output-shaft rpm → road speed and self-check the D3/D4 scaling. → [[driveline-speed-signals]]
- **`can_message_list.txt`** (same repo) — full ID → name → sending-module map, 0x00–0xFFF. Not yet mined; useful if the project ever wants non-powertrain data
- A capture taken **while the Launch scanner is polling** — would reveal the request/response byte sequences for boost, gearbox temp and DTCs → [[obd-diagnostic-polling]]