- 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.
All incoming changes kept as they were. Conflicts resolved by adding the
Engine-data pieces next to them:
- main.cpp: StatusOverlay::tick() and EngineScreen::tick()
- driveline_screen.cpp: both include sets; the old mismatch label stays
removed (overlay owns it); the Engine data button moves to y 60, left of
the diff-lock drawing, clear of the overlay band
- CLAUDE.md: Engine data bullet added; DiagProbe paragraph keeps its text
plus the live-mode sentence
- wiki: all incoming log entries kept, the 2026-10-07 entry appended;
open-questions #12 keeps the renamed line plus the 2026-10-07 update
Built clean locally (custom_sdkconfig core rebuild).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New screen (Engine data button on Driveline) polls the DDE with the
Launch's KWP `2C 10 <id>` reads: 00DF rail (bar = raw x 0.03, verified),
0091 boost (mbar = raw / 8), 16A8 charge-air temp, 0093 battery - the last
three provisional (one engine-off point each), tagged on screen with the
raw value shown for calibration.
DiagProbe live mode: `2C 10 15 E0` once, then the four reads in turn, one
in flight, ~100 ms apart, quiet on the console, paused by the foreign-tester
guard, stops 1.5 s after the screen stops asking. 2C stays forbidden from
the console. CANDriver::transmit gains an echo flag (live frames echoed only
with CANRAW on). Wiki: the three CANNY captures ingested, identifier table
and the no-password decision recorded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- capture-with-Launch session: live data on this DDE comes via KWP service
2C (2C 10 00 DF -> 6C 10 HHLL), not the 22 D1xx identifiers (absent) or
the session-gated 21 blocks
- rail pressure actual VERIFIED two-point vs the Launch display:
bar = HHLL x 0.03 (idle ~305, 2500 rpm ~430)
- recipe now generalises to any Launch-visible value; self-poll needs the
session/define handshake (captured, deferred design decision)
- wiki: sources/launch-capture-2026-09-23.md, obd-diagnostic-polling,
open-questions #7, index; raw serial capture (~13 MB)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Delete .docs/CAN_BUS_INTEGRATION.md (placeholder CAN IDs, external transceiver
wiring the board does not need); superseded by wiki/pages/can-id-candidates.md
- Move UART_PROTOCOL.md to docs/ as the single copy of the packet spec
- Move the annotated board photo into wiki/raw/ and add a source page for it
- CLAUDE.md: verified 11-bit CAN ID list replaces the placeholders, TWAI_MODE_NORMAL
replaces LISTEN_ONLY, UART TX is GPIO 44, dummy-data references removed
- Wiki index/log updated; note the schematic PDF is missing from disk
Co-Authored-By: Claude <noreply@anthropic.com>
Boot screen: land on the Driveline data screen instead of the SquareLine
gauges Home screen. Done in display_init after ui_init while the backlight is
still off (no flash of the wrong screen); Home stays reachable by swiping off
Driveline.
Engine torque added to the screen, decoded from 0x0A8 TORQ_AVL (available/
delivered torque), bits 12-23, signed x0.5 Nm. The user identified the ID and
supplied the spreadsheet formula (D2*256+D1)/32, which is algebraically
bits12-23 x0.5; confirmed against the repo's 0x0A8 worked example (24 Nm).
Firmware masks D1's low nibble (that's the alive counter, not torque - the
repo example shows ALIV=8 there) and sign-extends so overrun reads negative.
0x0AA TORQ_DVCH is the same layout but driver demand - identical at idle,
diverges under load - so the delivered value is the right one to show.
Output-shaft scaling revised: a direct Launch reference (output speed 128 rpm
at our raw 1192) implies ~0.107, contradicting the earlier x0.125 (which would
predict 149). One eyeballed cross-tool point, so nothing is adopted - the
field stays raw counts - but 0.125 is downgraded in firmware and wiki, and the
Launch now gives a direct rpm reference so calibration is just a multi-point
sweep and a linear fit.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
First capture with the vehicle actually moving (raw/log_20260717_145930.txt,
1857 frames, filtered to 0x0BA + 0x1D2).
Verified, closing yesterday's inference: ST_GR_GRB values 6/7/8/9/A observed
directly = 2nd..6th. So 0x0BA byte 0's low nibble is a COMPLETE gear source
on its own - P/R/N plus 1st..6th, reverse included. 0x1D2 is now needed only
for the lever and the D/S/M mode, which 0x0BA does not carry. Value 4 is
still unaccounted for.
Also caught ST_CCLT (torque converter lockup clutch) live - 422 frames
"controlling", clustered in the higher gears. This matters beyond curiosity:
a closed clutch bolts the turbine to the impeller, so turbine == engine
exactly. Any turbine/engine slip ratio read at road speed must check CCLT
first or it will report "not engaged" for a perfectly healthy locked-up box.
Decoded into driveline_t with that warning attached.
Output shaft: identification now verified (rises monotonically 1139->16702
across gears 1->6, zero whenever the output is held). Scaling narrowed to
x0.125 but NOT adopted - it implies a coherent 901->1872 rpm upshift schedule
across five independent 6HP26X ratios, where raw-as-rpm would imply
7,200-15,000 rpm against a ~4,500 redline. Still rests on the unproven
assumption that each gear's max output is its upshift point, so the field
stays in raw counts. One capture including 0x1A2 settles it: turbine/output
gives each ratio directly.
Gearbox confirmed as ZF 6HP26X (user). Same gearset as the 6HP26, so the
ratio table holds; the X is the xDrive output variant, which dates the donor
to E60/E61 rather than E65 - the 7-series never took M57N with xDrive. That
partly answers a standing open question, and raises a new one: the X box
measures its output shaft upstream of the transfer case, so if a Patrol
transfer case sits in the path its ratio enters the km/h conversion and
changes with high/low range.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
'wiki/raw/~$E60 VFL CAN-Bus Codes.xlsx' is a lock file Excel creates while a
spreadsheet is open, not a source document. It rode in on a broad 'git add
wiki/'. Removed from tracking and ignored so it cannot recur.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
The gear lever is fully decoded and confirmed on the actual swap bus
(raw/gear_box_can_revealings.csv): 0x1D2 byte0 = P 0xE1 / R 0xD2 / N 0xB4 /
D 0x78, matching the documented BMW codes exactly. Byte4 splits D vs S/M
(0xF0 auto) and carries manual +/- shifts.
Firmware:
- automotive_data.h: replace placeholder gear map (0x1001) with CAN_ID_GEAR_LEVER
0x1D2, verified byte-0 codes, byte-4 mode define, and can_to_gear_lever().
- can_driver.cpp: decode 0x1D2 byte0 into gear_position via the enum; reject
unrecognized codes instead of copying the raw byte.
- Scope: P/R/N/D only (verified). S/M shows as D for now (no enum slot; engaged
gear number needs a drive capture) — TODO'd, not faked. Coolant/oil/battery
left as flagged placeholders pending a cold-start capture.
Wiki:
- New source page gear-box-can-revealings + raw CSV filed.
- can-id-candidates: 0x1D2 gear row -> VERIFIED; encoding "dispute" section
rewritten with the full lever+mode decode table.
- Updated index + log.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Firmware — make the board a working CAN sniffer and fix real bugs:
- can_driver: add raw candump-style logger (CANRAW,<ts>,<id>,<extd>,<dlc>,<hex>),
capturing every frame incl. unknown IDs for offline decoding. Single atomic
write per frame.
- serial_lock: new global serial mutex so concurrent task writes (CAN logger,
UART 5Hz log, heartbeat) no longer splice mid-line. Corruption 3.2% -> 1.4%.
- Fix CAN toggle: the switch had no event handler registered, so it never
started CAN and reverted on screen change. Wire up onCANBusToggle.
- platformio: route Serial to native USB-CDC (USB_MODE=1, CDC_ON_BOOT=1) so the
~486 frame/s stream isn't throttled by the 115200 UART ceiling; bump monitor
baud to 921600.
- tools/fix_toolchain_path.py: pre-build workaround for pioarduino nesting the
Xtensa toolchain bin under a subdir that never reaches PATH.
- Correct misleading "LISTEN_ONLY" log string (driver runs TWAI_MODE_NORMAL).
Wiki — ingest the first live capture off the real swap bus:
- raw/can-capture-2026-07-15-gearshift.csv (20,596 frames) + sources page.
- Research map CONFIRMED: 0x1D0/0x1D2/0x0B5/0x3B4 all live; placeholder IDs
(0x4F/0x55/0x201/0x1001/0x101F) verified absent; 0x130/0x304/0x192 absent.
- 0x1D0 b0 coolant drifts up (37->40C, -48 holds); 0x1D0 b1 oil temp = 0xFF.
- 0x1D2 gear encoding resolved: DLC 6, byte0 gear codes (E1=P, B4=N, 78=D live).
- Corrected LISTEN_ONLY -> NORMAL/ACK across pages; documented non-isolated
TJA1051 grounding requirement. Updated index + log.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>