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>
4.6 KiB
Log
Append-only. grep "^## \[" log.md | tail -5 for recent activity.
[2026-07-15] setup | Wiki instantiated
Created schema (CLAUDE.md), index.md, log.md, and five seed pages built from repo knowledge: bmw-m57n-engine, esp32-s3-touch-lcd-5b, can-bus-integration, dual-controller-architecture, open-questions. Deleted Obsidian's default Welcome.md. Flagged: the firmware's CAN ID map looks like placeholders (two IDs exceed 11-bit range); raw/ESP32-S3-Touch-LCD-5B.md is an empty clip and needs re-clipping.
[2026-07-15] ingest | Waveshare ESP32-S3-Touch-LCD-5 product wiki
Re-clipped raw/ESP32-S3-Touch-LCD-5B.md ingested → esp32-s3-touch-lcd-5b-waveshare-wiki. Answered two open questions: CAN transceiver is onboard (TJA1051T/3/1J, terminal block, 120 Ω termination switch off by default) and power is solved by the 7–36 V DC wide input (vehicle 12 V direct). New concern raised: operating temp spec is 0–65 °C, marginal for automotive. Updated esp32-s3-touch-lcd-5b and open-questions; added schematic PDF to sourcing wishlist.
[2026-07-15] ingest | E60 VFL CAN codes spreadsheet + Listen_and_send_PID Arduino sketch
Two raw sources ingested. (1) E60 VFL CAN-Bus Codes.xlsx (community table, ~130 ID blocks from a real pre-facelift E60) → e60-vfl-can-codes-xlsx: independently confirms 0x1D0 coolant raw−48 (0x7A→74 °C) and 0x3B4 battery voltage (leaning 12-bit LE layout, factor ≈0.0147–0.015), adds 0x304 as a 2-byte gear-lever candidate (P=E3/R=C2/N=D1/M=C9, D value suspect), engine-running flag in 0x3B4 byte 3; contains no oil-temp or gearbox-temp rows. (2) Listen_and_send_PID_009c (Arduino MCP2515+ELM327, 2013) → listen-and-send-pid-arduino: transmits E46 cluster frames from OBD PID polling — filed as technique reference for a future diagnostic-request mode; no map changes. can-id-candidates updated: coolant now "very high" confidence; oil/gearbox temps flagged as weakest signals.
[2026-07-15] query | Deep research: E60/E65 CAN IDs for M57N + ZF EGS
Deep-research workflow ran (interrupted twice by session task-loss on Windows; ~82 agents total, 95 claims, 30 adversarial verifications completed; synthesis done manually from the journal). Result: can-id-candidates — coolant/oil temp on 0x1D0 (raw−48, DDE, 100 ms; confirmed live on a real E60), gear on 0x1D2 (EGS, 200 ms, two generation dialects that likely reconcile), gearbox oil temp on 0x0B5 byte 7 (offset disputed 0 vs +40 — bench-critical), battery voltage on 0x3B4 (layout disputed 12-bit×0.015 vs 24-bit×0.001). Fault codes are NOT passively broadcast — require 0x6F1/0x612 diagnostic requests; firmware fault_codes field needs a design decision. Firmware's placeholder IDs contradicted by every source. Updated can-bus-integration; index updated. Cost note: bulk of tokens spent in the initial (pre-interruption) run; resumes replayed from cache.
[2026-07-15] update | Donor and target vehicle confirmed by user
User confirmed: donor chassis is E60/E65 (2003+), transmission is a BMW auto with EGS on the CAN bus, target vehicle is a Nissan Patrol. Created nissan-patrol-swap; updated bmw-m57n-engine (E46-era candidate IDs flagged as probably wrong generation) and open-questions (three questions moved to Answered). Next: web research for E60-generation PT-CAN broadcast IDs.
[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.