Files
ESP32-S3-Touch-LCD-5B/wiki/pages/open-questions.md
T
julian 842f270398
Firmware / build (push) Successful in 6s
Wiki sweep for the OTA/display session
- ota-updates: status table of every OTA cycle (incl. the 570 B abort and the
  clean failure path), v0.1.3 published/not installed, 'installs are done by the
  running firmware', flicker cause verified, Wi-Fi lost on reboot, console
  without reset, B repo now public
- esp32-s3-touch-lcd-5b: drop the unmeasured ~50 FPS claim, USB serial is
  native CDC with the DTR/RTS reset gotcha, new lessons (flash-write flicker,
  fade stutter, internal RAM, never power the radio off, dual-slot partitions)
- dual-controller-architecture: ESP-NOW/Wi-Fi radio sharing, disconnect(true)
  bug, B updates via A over ESP-NOW
- open-questions #14: Wi-Fi UX redesign, remember network, delete v0.1.0
- CLAUDE.md: same FPS / USB-serial corrections; index + log

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 00:05:13 +02:00

14 KiB
Raw Blame History

type, tags, updated
type tags updated
synthesis
meta
todo
2026-09-27

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

  1. What is the scaling of 0x0BA D3/D4 (output shaft speed)? Identification verified; factor still open and revised 2026-07-17. The field is confirmed output shaft speed (rises monotonically 1st→6th, zero whenever the output is held). The factor is not settled: the upshift-schedule test suggested ×0.125, but a direct Launch reference (128 rpm @ raw 1192) contradicts it — that implies ~0.107 (0.125 would predict 149 rpm). One eyeballed cross-tool point isn't a calibration, so nothing is adopted yet. Closing it is now easy: the Launch reads output speed directly in rpm, so log several simultaneous (raw, Launch-rpm) pairs across a speed sweep and fit a line (slope = factor, intercept ≈ 0). Log 0x1A2 too for an independent box-identity cross-check. Still the project's only road-speed signal (no DSC on this bus). → driveline-speed-signals

  2. Was the BMW transfer case retained, and what's downstream? The 6HP26X measures its output shaft upstream of the transfer case, so raw counts → km/h depends on the path: BMW case retained (rear output ~1:1, math unaffected) / deleted and coupled straight to the Patrol driveline (also fine) / a Patrol transfer case in the path (its ratio enters the calculation and changes with high/low range, making road speed range-dependent). → nissan-patrol-swap

  3. 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

  4. 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

Design decisions (parked, not blocking)

  1. The "Diagnostics" screen (planned 2026-09-23). Active diagnostic polling — replaying the 2C live-data reads we decoded (launch-capture-2026-09-23) so values like rail pressure appear on Controller A without the Launch — is now technically unblocked (no session/security needed). Intended design when built: a password-protected Diagnostics screen, authorized-technician access only, manual trigger, refuses while a scan tool is connected, read-oriented services only. The same gate covers the general transmit-on-the-bus decision. This is deliberately deferred, but the capability, the byte sequences, and these guard rails are recorded so the work resumes from here, not from scratch. Also the home of the OTA "check / install" controls (2026-09-26) — today they are the ota console; the password must be stored as a salted hash in NVS because the firmware is public. → obd-diagnostic-polling, dual-controller-architecture, ota-updates

Project context

  1. Exact donor model year / DDE version and EGS variant? Partly answered 2026-07-17. The gearbox is a ZF 6HP26X (user-confirmed) — the X is the xDrive output variant, which means the donor is an E60/E61, not an E65: the 7-series never took M57N + xDrive. Remaining: model year and DDE version. Cheap to close (2026-09-21): the Launch scanner's ECU-identification page (or any INPA "control unit found" string) names the variant — D60M57D0/D62M57B0 = DDE6 (EDC16), D73N57C0 = DDE7.3 (EDC17). Update 2026-09-23: generic OBD can NOT close this — mode 09 (VIN 09 02, ECU name 09 0A) is ACKed but never answered (diag-route-a-2026-09-23). Same afternoon, mostly ANSWERED via Route B: 1A 86 on 0x6F1 returned the DDE ident — VIN prefix WBANC92090 → E60 530d (unverified decode), DDE part numbers 7 799 764 / 7 799 765 / 7 793 887, date 2006-03, and the DDE speaks KWP2000 not UDS (diag-route-b-2026-09-23). Remaining sliver: look up the part numbers / NC9x model code online to pin the exact DDE variant (DDE6.1 vs 6.2, M57N vs M57N2) — a web/parts-catalogue task now, no more hardware needed. → bmw-m57n-engine, obd-diagnostic-polling
  2. Standalone harness or full donor loom? Which BMW modules were retained? Affects which modules broadcast on the swap's bus. → nissan-patrol-swap
  3. Which Patrol generation, and how is the display being mounted/powered? → nissan-patrol-swap

Hardware

  1. 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)?
  2. 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).
  3. 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. Update 2026-09-21: the user has seen 0x612 appear on the tapped bus while the Launch is connected — that is the DDE replying (0x600 + DDE address 0x12); the requests go out on 0x6F1. Diagnostic traffic therefore reaches our tap, so the capture will contain both halves. Page written with the capture procedure and the firmware implications (polling = transmitting on the bus). Cheapest first experiment (from dwr-335d-torque-pids): one generic 01 00 supported-PID query on 0x7DF — tells whether this DDE answers EOBD on the PT-CAN and which mode-01 PIDs it has, with zero BMW-specific knowledge. Update 2026-09-23 — experiment run, answer: YES. The DDE serves mode 01 on 0x7E8 (verified), and PID 01 shows MIL off with 5 stored DTCs (diag-route-a-2026-09-23). Same afternoon: diag dtc (mode 03) read them (verified): P0101 (MAF), P0113 (IAT), P0500 (VSS), P0545 (EGT), P0030 (O2 heater) — all disconnected-sensor swap leftovers, and the first two explain the garbage MAF/IAT PID values (diag-route-b-2026-09-23). Route B addressing also verified live (0x6F1 [12] → 0x612). What remains of this question: BMW-specific (non-P0xxx) codes and the live-data identifiers. Update 2026-09-23 — Launch capture done (launch-capture-2026-09-23): live data comes via service 2C (not 22 D1xx, which don't exist here); rail pressure fully decoded and verified (2C 10 00 DF → 6C 10 HHLL, bar = HHLL × 0.03). The recipe now generalises to any Launch-visible value (boost, MAF, injection… one capture session each). Reading them without the Launch needs replaying the session/define handshake — a transmit-on-the-bus design decision, deferred. → 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, moving or stationary). Use 0x0BA ST_GR_GRB = 2. For physical proof of engagement, use turbine speed. (verified, 2026-07-17) → driveline-speed-signals

  • Are 0x0BA ST_GR_GRB values 6–A really 2nd–6th? → Yes, all observed directly in the drive capture. 0x0BA D0's low nibble is a complete gear source on its own (P/R/N + 1st–6th, reverse included). (verified, 2026-07-17) → can-capture-2026-07-17-drive

  • 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. Step-by-step procedure now on obd-diagnostic-polling; also read the Launch's ECU-identification page during the same session (closes #2)
  • Web search on DDE7 M57 PIDs ✅ clipped → google-ai-dde7m57-pids — uncited AI summary; identifiers (unverified), addressing claim contradicted
  • A worked generic-PID set for an M57 diesel ✅ ingested → dwr-335d-torque-pids (2009 335d, DDE7.3; J1979 mode-01 scalings gauge-checked by the author)
  • DWR's Testo parameter list (e90post "Testo" thread, post 175, German→English names of the DDE's non-standard values) — the pointer for Route B identifiers if our own Launch capture is not enough
  1. Internal RAM is nearly exhausted (found 2026-09-26). With display + Wi-Fi up: 15.9 KB internal free, largest block 7.6 KB (PSRAM 7.1 MB free). OTA works around it (ota-updates), but anything else that needs an internal allocation (another task, a TLS client, a bigger Wi-Fi burst) can fail. Biggest known consumer: the LVGL 60-line DMA draw buffer (~120 KB). Options: shrink it to ~30–40 lines, or measure what else lives in internal RAM first (heap_caps_print_heap_info). Not urgent, but it limits every future feature. Same project as the display flicker/lag (2026-09-26): flash writes flicker the PSRAM-fed RGB panel (no bounce buffer) and full-screen transitions stutter. Espressif's cure is bounce buffers + CONFIG_SPIRAM_XIP_FROM_PSRAM (needs pioarduino custom_sdkconfig), and bounce buffers need internal RAM — so free RAM, add bounce buffers, and measure real render FPS (LVGL perf monitor; the Debug "FPS" counts loop() passes, not frames) in one bench session. Quick mitigations shipped in v0.1.2 (instant screen switches, deferred NVS saves, dark screen during OTA).

  2. Wi-Fi UX (found 2026-09-26). The Settings Wi-Fi screen had never worked (switch shipped disabled) and, now usable, is "a disaster UX" (user): SquareLine-generated, runtime SSID buttons + floating keyboard + loading overlay, no on-screen confirmation of a successful join. Also: A forgets the network on every reboot (each boot needs wifi join). To do: redesign as a hand-coded screen (like Driveline/Tuning, safe from SquareLine re-exports), show connection state, remember the network in NVS and auto-join; consider housing it on the Diagnostics screen (#12) next to the OTA controls, since Wi-Fi now mainly serves updates. Housekeeping: delete the v0.1.0 release on Gitea — installing it would strand the board without working OTA (USB only). → ota-updates