Files
ESP32-S3-Touch-LCD-5B/wiki/pages/open-questions.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

62 lines
7.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
type: synthesis
tags: [meta, todo]
updated: 2026-07-17
---
# Open Questions
The research frontier. Answering any of these should trigger updates across the wiki. Ordered roughly by how much they block progress.
## Blocking
*(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
2. **Exact donor model year / DDE version and EGS variant?** Chassis generation is known (E60/E65); the precise ECU versions would narrow the matrix further. → [[bmw-m57n-engine]]
3. **Standalone harness or full donor loom? Which BMW modules were retained?** Affects which modules broadcast on the swap's bus. → [[nissan-patrol-swap]]
4. **Which Patrol generation, and how is the display being mounted/powered?** → [[nissan-patrol-swap]]
## Hardware
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)` — **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]]
- ~~CAN transceiver?~~ → **Onboard TJA1051T/3/1J** on a terminal block; leave the 120 Ω termination switch OFF when tapping the vehicle bus. (source: waveshare-wiki, 2026-07-15) → [[esp32-s3-touch-lcd-5b]]
- ~~Does passive-ish listening actually work on this bus?~~ → **Yes** — first live capture pulled 15 IDs cleanly at ~486 frame/s (verified, 2026-07-15). Note the firmware runs `TWAI_MODE_NORMAL` (ACKs), not LISTEN_ONLY. → [[can-capture-2026-07-15]]
- ~~How to ground the board to the vehicle?~~ → TJA1051 is **non-isolated**; share ground with the vehicle (power from 12 V, or ground-wire + laptop on battery to avoid a ground loop). (verified, 2026-07-15) → [[esp32-s3-touch-lcd-5b]]
- ~~12 V → 5 V power conversion?~~ → **Not needed**: board has a 7–36 V DC wide input. Residual transient concern moved to #6. (source: waveshare-wiki, 2026-07-15)
## Sourcing wishlist
- ~~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~~ ✅ 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]]