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:
@@ -26,6 +26,10 @@ User confirmed: donor chassis is **E60/E65 (2003+)**, transmission is a **BMW au
|
||||
|
||||
User captured steady byte values per lever detent (`raw/gear_box_can_revealings.csv`) → [[gear-box-can-revealings]]. **0x1D2 verified as the gear source**: byte0 = P `0xE1` / R `0xD2` / N `0xB4` / D `0x78` (all match documented codes exactly); byte0 can't split D from S/M (shared `0x78`) so byte4 does it (`0xF0` auto / `0xF1` Sport-Manual / `0xF2` downshift −); byte1 is a drive-gate flag (`0x0F`→`0x5F`); byte3 = rolling counter (confirms prediction). 0x0BA also tracks the lever but is messier (D/S-M collide) — don't use. Promoted 0x1D2 gear row to VERIFIED and rewrote the encoding-dispute section in [[can-id-candidates]]; updated index. Still open: actual engaged gear number (needs a drive capture) and the manual up-shift (+) value. Next: rewrite firmware gear map to 0x1D2 byte0 (+byte4).
|
||||
|
||||
## [2026-07-17] ingest | E65_ReverseEngineering repo — both disputes resolved, driveline speeds discovered
|
||||
|
||||
User pointed at `HeinrichG-V12/E65_ReverseEngineering` (per-ID DBC-style docs, worked example on every page) → [[e65-reverse-engineering-repo]]. Highest-value source to date; combined with re-analysis of our own `raw/can-capture-2026-07-15-gearshift.csv` it closed most of the frontier. **Resolved**: gearbox oil temp = **raw − 40** (source example + our own gearbox-31 °C-vs-coolant-37 °C warm-up cross-check; my earlier "leaning offset 0" was wrong); battery = **12-bit LE × 0.015**; engine **was running** in the 2026-07-15 capture (`ST_ENGINE_RUN`=2 in 397/397) — **cold-start capture no longer needed**; RPM = `0x0AA` ×0.25 (679–684 idle). **Discovered**: `0x1A2` `RPM_GRB_TURB` turbine speed — a *physical* engagement proof (P/N ≈634/628 free-spinning vs D ≈70, R ≈0 stalled — textbook converter behaviour), plus `0x0BA` bits 20–39 output shaft (undocumented anywhere; zero in every stationary frame incl. engaged-in-D, non-zero once wheels turn), plus `ANG_ACPD` pedal % and `ST_CLCTR_V` cruise state. New page [[driveline-speed-signals]] — emphasized per user: **no DSC on this bus ⇒ output shaft is our only road-speed source**, hence the feedback variable for a future cruise-control PoC (safety envelope documented; actuation = transmitting torque requests, a different risk class from everything read-only so far). **Corrected three of my own 2026-07-16 claims**: `0x1D2` D1 is the *engaged gear* (not a "drive-gate flag" — it read 1 because the car was stationary); D4 `0xF2` is a persistent *Manual mode* (not a "downshift event" — it holds across gears 2–6); `0x0BA` is **not** to be dismissed (I'd read D7, an alive counter, instead of D0's `ST_GR_GRB` — which is the only source of engaged **reverse**, `0x1D2` D1 staying `0x0F` in R). Also: boost is **not** broadcast (`AIP_ENG` caps at 1108 hPa = barometric) — confirms the Launch must poll. Updated [[can-id-candidates]], [[gear-box-can-revealings]], [[open-questions]], index. Next: firmware pass over the whole verified map.
|
||||
|
||||
## [2026-07-16] ingest | First live CAN capture — research map CONFIRMED
|
||||
|
||||
First real dump off the swap's bus, taken with the board's **own new raw-frame logger** (`(repo)`; USB-CDC stream, serial mutex, ~486 frame/s, ~1.4% line loss). Raw filed at `raw/can-capture-2026-07-15-gearshift.csv` (20,596 frames) → [[can-capture-2026-07-15]]. Findings: 15 IDs live incl. **all four researched signal IDs** (0x1D0, 0x1D2, 0x0B5, 0x3B4) + bonus 0x0AA/0x0BA; firmware's placeholder IDs (0x4F/0x55/0x201/0x1001/0x101F) **verified absent**; researched-but-absent: 0x130/0x304/0x192. **0x1D0 b0** drifts 0x55→0x58 (coolant −48, ~37→40 °C); **0x1D0 b1 = 0xFF** (oil temp unpopulated). **0x1D2 gear encoding resolved**: DLC 6, byte0 whole-byte codes (0xE1=P, 0xB4=N, 0x78=D seen live). **0x3B4** at ~5 s rate but payload dormant (0xFF) — engine state unconfirmed. Updated [[can-id-candidates]], [[can-bus-integration]], [[esp32-s3-touch-lcd-5b]], [[open-questions]], index. Also corrected a firmware fact across pages: driver runs **`TWAI_MODE_NORMAL` (ACKs the bus), not LISTEN_ONLY**; TJA1051 is non-isolated → must share vehicle ground. Next: cold-start + confirmed-engine-running capture to lock coolant/battery scaling; use differential (per-position) captures for gear.
|
||||
|
||||
Reference in New Issue
Block a user