Commit Graph

36 Commits

Author SHA1 Message Date
julian 94c70a572b Wiki: display baseline session analysed (perf-baseline-2026-09-27); Q13 plan amended with step 1b
Firmware / build (push) Successful in 6s
2026-09-27 16:52:11 +02:00
julian d3e499efed Add perf console (render fps, flush cost, CPU idle, heap) for the display work; record idle baseline
Firmware / build (push) Successful in 4m8s
2026-09-27 16:43:53 +02:00
julian 43ca6b96ec Wiki: Q13 becomes a must-fix (dots persist, OTA needs on-screen progress); log the review
Firmware / build (push) Successful in 6s
2026-09-27 16:31:21 +02:00
julian 23b7027d40 Wiki: board schematic re-downloaded; VOUT = H8 solder jumper (3V3 default / 5V), 5 V rail budget, SD pins
Firmware / build (push) Successful in 6s
2026-09-27 16:15:07 +02:00
julian 40a21557f0 Wiki: display platform plan (open-questions #13), SquareLine decommissioned
Firmware / build (push) Successful in 5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 08:29:02 +02:00
julian 5d495f8ad1 Wiki: v0.1.5 UX refactor, remembered Wi-Fi, on-screen updates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 07:55:09 +02:00
julian 766019a01e Fix UI freeze/reboots: LVGL pool to PSRAM, dangling SSID buttons, scan policy
Firmware / build (push) Successful in 4m24s
- lv_conf: LVGL widget pool 48 KB internal -> 512 KB PSRAM (LV_MEM_POOL_ALLOC).
  It ran out after a few Settings visits (87% used, 31% frag, 4.5 KB biggest
  block; lv_mem_buf_get() failed in a label draw - decoded backtrace). Also
  frees 48 KB of internal RAM: free 16 -> 69 KB, largest block 7.6 -> 31.7 KB
- lv_conf: LV_ASSERT_HANDLER abort() instead of while(1), which spun inside the
  task holding the LVGL lock and froze the UI + console
- wifi_manager: SSID buttons clear their g_ssid_buttons[] slot on
  LV_EVENT_DELETE (SquareLine deletes the Settings screen on leave; stale
  pointers were lv_obj_del()'d on the next scan). Scan only while the list is
  on screen and not connected - 10 s background scans caused the display dots
- main: `mem` console command (internal heap, PSRAM, LVGL pool)
- docs: board page lessons, open-questions #13/#14, ota-updates, CLAUDE.md, log

Verified: 10 Settings visits + 9 list rebuilds, pool peak 4%, 0 crashes; user
confirms no freeze, no reboot, no dots, swipes better.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 00:32:18 +02:00
julian 842f270398 Wiki sweep for the OTA/display session
Firmware / build (push) Successful in 6s
- 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
julian 29711fa25e CI: skip main builds for tagged or docs-only commits
Firmware / build (push) Successful in 3m56s
A main push now skips itself when its commit already carries a v* tag (the tag
build covers it - release with git push --follow-tags) or when it only changes
wiki/** or *.md. Checked inside the job, so tag builds are never path-filtered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 23:58:32 +02:00
julian eb9cbd985f Display quick fixes: instant screen switches, deferred NVS saves, dark OTA writes, version label
Firmware / build (push) Successful in 4m30s
- screen switches use LV_SCR_LOAD_ANIM_NONE: full-screen fades were re-rendered
  and blended in software every frame and stuttered at 1024x600
- Tunables: NVS write 3 s after the last change or on leaving the Tuning screen
  (Tunables::flush()), not per tap - each flash write flickers the RGB panel
- OTA: backlight off while the image is written, with full-screen notices
  before and after; tunables flushed before any reboot
- firmware version shown bottom-right on every screen (lv_layer_top)
- docs: CLAUDE.md, wiki ota-updates, open-questions #13, log

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 23:00:28 +02:00
julian 0a76cd8c0e Wiki: first OTA update verified end-to-end (dev -> v0.1.1)
Firmware / build (push) Successful in 4m21s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 22:49:59 +02:00
julian bb0895674a OTA bring-up fixes: loop-task jobs + PSRAM TLS, ESP-NOW survives Wi-Fi, wifi console
Firmware / build (push) Successful in 4m24s
- ota: internal RAM has 15.9 KB free / 7.6 KB largest block with Wi-Fi up, so
  jobs now run in the loop task (8 KB stack; 3.6 KB headroom measured on
  `ota check`) with mbedtls allocations routed to PSRAM during the job
- wifi_manager: WiFi.disconnect(true) powered the radio off and killed ESP-NOW
  whenever Wi-Fi was used; now disconnect() only. showConnectionResult() waits
  for the LVGL lock and null-checks widgets. New `wifi join|status|off` console
- espnow_link: send() re-initialises ESP-NOW if the driver dropped it
- wiki: ota-updates memory + bugs sections, open-questions #13 (internal RAM),
  log; CLAUDE.md notes

Verified on the board: `wifi join` connects, ESP-NOW 195 sent / 0 failed while
joined, `ota check` verifies v0.1.0's signature on-device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 22:37:08 +02:00
julian 1ec93dc413 Rename signing secret to BMW_NISSAN_FIRMWARE_SIGNING_KEY
Firmware / build (push) Successful in 4m5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 22:05:16 +02:00
julian effa949429 OTA updates for Controller A: dual-slot partitions, signed Gitea releases
- partition table: two 7.9 MB OTA slots, SPIFFS dropped, nvs/otadata offsets
  unchanged (tunables survived the one-time USB flash)
- ota_update.cpp: manual `ota status|check|install|rollback` console; HTTPS
  pull from the public repo's latest release, ECDSA P-256 signature over
  "patrol-a|version|sha256" checked before download, streamed image must match,
  parked gate before download and before the slot switch, 30 s
  confirm-or-rollback (verifyRollbackLater override)
- ota_config.h: server/repo, ISRG Root X1 + Root YR, signing public key
- .gitea/workflows/firmware.yml: main -> rolling unsigned pre-release
  main-latest; v* tag -> signed release (needs secret FIRMWARE_SIGNING_KEY)
- wiki: pages/ota-updates.md (design, decisions, B-over-ESP-NOW plan);
  CLAUDE.md, index, log, open-questions #12 updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 21:59:46 +02:00
julian da4c96903b Clarify self-poll needs no session/security; record Diagnostics-screen plan
- capture proof: Launch used only 1A/2C/22/23 - no 10/27/3E. Self-polling a
  2C live value needs just the define + poll, no session or security seed.
  Corrected the earlier "needs session handshake" wording.
- design decision: active polling (if built) lives behind a password-
  protected Diagnostics screen - authorized-tech gate, manual, refuses with
  a scan tool connected, read-oriented services. open-questions #12.
- wiki: launch-capture + obd-diagnostic-polling tightened; project memory
  added so the capability and guard rails are not re-researched later

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 17:06:20 +02:00
julian 6bdf4d43a9 Launch capture: decode rail pressure (service 2C, bar = raw x 0.03)
- 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>
2026-09-23 16:48:10 +02:00
julian 61e190b1b9 Diag scans: 22 D1xx refuted, 21 xx session-locked; add diag raw toggle + scanner
- diag probe: `diag raw on|off` console command (mutes CANRAW during scans)
- tools/diag_scan.py: identifier-space sweeper via `diag bmw`
- findings: whole 22 D1xx block NRCs (clipping identifiers wrong for this
  DDE); 21 xx sparse - 21 20 = O_269962, measurement blocks gated behind
  diagnostic session / security access -> Launch capture is the path to
  live data
- wiki: route-b source page + obd-diagnostic-polling updated, raw scan logs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 16:02:18 +02:00
julian 7a7398243b Diag day: Route A+B verified live, DTCs read, donor identified as E60 530d
- diag probe: add mode 03 (diag dtc), BMW KWP on 0x6F1 with extended
  addressing (diag ident, diag bmw), read-only service whitelist
  (1A/18/21/22), MAX_PAYLOAD 64->384, full hex+ascii dump of BMW replies
- tools/diag_session.py: one-session probe runner, logs into wiki/raw/
- wiki: Route A results (11 mode-01 PIDs, rpm/coolant cross-checked, mode
  09 silent), Route B verified (0x6F1 [12] -> 0x612), 1A 86 ident with
  VIN prefix WBANC92090 (E60 530d), DTCs P0101/P0113/P0500/P0545/P0030
  (disconnected-sensor swap leftovers), open-questions #2/#7 updated

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 12:54:24 +02:00
julian e9fc24778a Gauge drive day: CANNY comparison, cluster signal research, serial tools
Wiki: two new pages - canny-5-3-pico-gauge-drive (why the CANNY's 12V
negative output moved the needles and 3.3V push-pull could not; 2SK3069
low-side stage) and patrol-instrument-cluster (tach 2 ppr + trim -13
calibration, NTC temp sender curve, 20 kHz PWM flutter fix, and the
four-layer steppy-needle diagnosis ending at the cluster's ~150 rpm
count quantization, defeated with adaptive dither on B).

Tools: serial_logger.py (multi-port capture to wiki/raw), serial_cmd.py
(one-shot cfg commands to A), dual_serial_capture.py (bench snapshots),
tach_ramp.py / tach_ramp2.py (synthetic rpm sweeps via cfg override).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 11:12:20 +02:00
julian 974082cb3e Add diag console probe (OBD-II mode 01/09 on 0x7DF); wiki: diagnostic polling, two sources
Firmware:
- CANDriver::transmit(): the single sanctioned transmit path (single-shot,
  echoed as CANTX lines, TX_FAILED alert counted); CAN-task warnings now take
  the serial lock
- DiagProbe module: `diag pids` supported-PID bitmap scan, `diag pid <hex>`,
  `diag vin`, `diag ecu`, `diag status`; ISO-TP reassembly with flow control;
  one request in flight, refused for 3 s after any foreign tester frame
- Console dispatch chained via Tunables::setExtraCommandHandler()
- CLAUDE.md and docs/UART_PROTOCOL.md updated

Wiki:
- New page obd-diagnostic-polling (broadcast vs polled, 0x6F1->0x612 addressing,
  Route A generic OBD PID table, Route B, test-day procedure, firmware probe)
- New sources: google-ai-dde7m57-pids (clipping, unverified, 0x612 direction
  contradicted), dwr-335d-torque-pids (thread + raw/BMW 335d.csv decoded)
- Clippings/ folder added to the schema (Obsidian Web Clipper, treated as raw/)
- bmw-m57n-engine, can-bus-integration, open-questions, index, log updated
2026-09-21 19:51:49 +02:00
julian f60bdac268 Link protocol v2, ESP-NOW leg, gauge tunables + tuning screen; remove Home screen
Protocol v2 (shared header, byte-identical with the 1.3 repo):
- typed DATA/CONFIG frames: 0xAA | ver | type | len | payload | XOR | 0x55
- gear split into lever (P/R/N/D/S/M) + target/engaged nibbles, engine rpm,
  alert bitmap decided here from tunable thresholds, link_config_t tunables
- docs/UART_PROTOCOL.md rewritten for v2

Controller A modules:
- tunables: gauge calibration + alert thresholds in NVS, 'cfg' serial console,
  bench override (never persisted)
- espnow_link: every frame also broadcast on ESP-NOW ch 1; radio stays in STA
  (WiFiManager no longer powers it off)
- uart_manager: DATA at 5 Hz + CONFIG on change/5 s on both transports
- can_driver: publishes gear pieces and rpm, evaluates alerts
- tuning_screen: hand-coded Gauge Tuning page (swipe right from Driveline),
  -/+ rows, enable switches, override sliders, Driveline/Defaults buttons

UI: SquareLine Home screen (3 meters + battery) and meters_manager removed;
Driveline is the boot screen; Settings back-gesture calls app_show_driveline().

tools/fix_penv_deps.ps1: repairs the shared PlatformIO penv after a 1.3 build.
Bench-verified with Controller B: both transports alive, dedupe, override
rpm 2000 -> 133.3 Hz tach output.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-21 19:12:31 +02:00
julian a8f68ebc27 Update workspace configuration: change Welcome.md to New tab and adjust file explorer settings 2026-09-21 11:00:50 +02:00
julian 63367f5490 Retire .docs; move UART spec to docs/; correct stale CAN/UART facts in CLAUDE.md
- 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>
2026-09-21 10:56:59 +02:00
julian 8c9ee2cde2 Note 0x3B4 ignition nibble is on-change (instant), not 5 s lag
User-verified: 0x3B4's ignition nibble flips the instant the key toggles, even
though the message is nominally 5 s periodic - it transmits on-change too. So
the ignition-off screen reset is effectively immediate, correcting the earlier
assumption that it could lag by a few seconds. Comment/doc only, no logic change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 18:39:35 +02:00
julian 037227ba34 Driveline screen: drop turbine tile, show output shaft as provisional rpm
Turbine speed removed from the display - it's an engagement diagnostic, not a
driver number, and the Launch now gives output speed directly so it's no
longer needed for the ratio-calibration method either. Still decoded in the
driver. Its screen slot now shows accelerator pedal %.

Output shaft now displays approximate rpm instead of raw counts, via a
PROVISIONAL factor from the single Launch reference (128 rpm / 1192 raw =
~0.107, through a known zero). The tile is labelled "OUTPUT (~rpm)" - the "~"
keeps an unlocked scaling from reading as exact. Replace the factor once a
multi-point Launch sweep gives a real fit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 18:15:42 +02:00
julian e10e03eb90 Driveline screen: boot into it, add engine torque, revise shaft scaling
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>
2026-07-17 17:45:00 +02:00
julian 0bd8f5c14d Drive capture: 0x0BA gear ladder verified, output-shaft scaling narrowed
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>
2026-07-17 15:15:35 +02:00
julian 1f39e5537a Drop Excel lock file swept into the last commit; gitignore ~$*
'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>
2026-07-17 12:33:51 +02:00
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
julian 0a58afca9a Gear decode VERIFIED: real 0x1D2 map in firmware + wiki
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>
2026-07-16 14:54:06 +02:00
julian 87801c593c CAN raw logger + toggle fix; wiki: first live capture confirms ID map
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>
2026-07-16 12:24:25 +02:00
julian f7a2d1c3bd wiki: Add live-capture field checklist to CAN ID candidates 2026-07-15 17:20:11 +02:00
julian 662266e875 wiki: Ingest E60 VFL CAN spreadsheet + PID-request Arduino reference 2026-07-15 17:16:27 +02:00
julian 6770bf111b wiki: E60/E65 donor confirmed; CAN ID research results (0x1D0/0x1D2/0x0B5/0x3B4) 2026-07-15 12:47:02 +02:00
julian 90862a573b wiki: Ingest Waveshare LCD-5B product page; resolve CAN transceiver and power questions 2026-07-15 12:22:25 +02:00
julian 37f98a241f Init new era, with wiki integrated. 2026-07-15 12:17:06 +02:00