Init new era, with wiki integrated.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
---
|
||||
type: entity
|
||||
tags: [engine, bmw, can-bus]
|
||||
updated: 2026-07-15
|
||||
---
|
||||
|
||||
# BMW M57N Engine
|
||||
|
||||
The target engine for this project: the display reads its CAN bus and shows live data. Everything below is `(unverified)` LLM prior knowledge until backed by an ingested source or real-world testing — treat as a starting map, not gospel.
|
||||
|
||||
## Overview (unverified)
|
||||
|
||||
- 3.0 L inline-6 turbo-diesel, second generation ("N" = updated) of the M57 family, produced roughly 2002–2008.
|
||||
- Fitted to E46 330d, E39/E60 530d, E53 X5 3.0d, E65 730d, Range Rover L322 (as Td6), among others.
|
||||
- Engine management: Bosch **DDE** (Digitale Diesel Elektronik) — DDE5/DDE6 era depending on year.
|
||||
- The DDE broadcasts engine data on the vehicle's **PT-CAN at 500 kbps**, which matches the firmware's configured baud rate `(repo)`.
|
||||
|
||||
## Data we want from it
|
||||
|
||||
Per the project goals: coolant temperature, oil temperature, gearbox oil temperature, gear position/number, battery voltage, fault codes → see [[can-bus-integration]] for the message-ID question.
|
||||
|
||||
## Key unknowns
|
||||
|
||||
- Which donor vehicle / which DDE version this specific engine came from — this determines the exact CAN matrix. → [[open-questions]]
|
||||
- Whether gearbox data is available at all: gearbox temperature and gear position come from the **transmission ECU (EGS)**, not the DDE. If the swap kept only the engine + DDE, those messages may not exist on the bus. `(unverified)` → [[open-questions]]
|
||||
- Whether a standalone/swap harness alters what's broadcast.
|
||||
|
||||
## Candidate CAN IDs to verify (unverified — E46/E39-era BMW, widely reported in reverse-engineering communities)
|
||||
|
||||
| ID | Reported content |
|
||||
|------|------------------|
|
||||
| 0x316 | Engine RPM, key status |
|
||||
| 0x329 | Coolant temp, throttle/pedal position |
|
||||
| 0x545 | Check-engine / warning lights, oil temp (some models) |
|
||||
| 0x43F / 0x43B | EGS gear data (model-dependent) |
|
||||
|
||||
> [!warning]
|
||||
> These do NOT match the IDs currently in the firmware (`0x4F`, `0x55`, `0x201`, `0x1001`, `0x101F` `(repo)`). See [[can-bus-integration]] for why the firmware IDs look like placeholders.
|
||||
|
||||
## Related
|
||||
|
||||
[[can-bus-integration]] · [[dual-controller-architecture]] · [[open-questions]]
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
type: concept
|
||||
tags: [can-bus, reverse-engineering]
|
||||
updated: 2026-07-15
|
||||
---
|
||||
|
||||
# CAN Bus Integration
|
||||
|
||||
The core technical challenge of the project: reading real data from the [[bmw-m57n-engine]]'s CAN bus and mapping it into the display's data structure.
|
||||
|
||||
## Current firmware state (repo)
|
||||
|
||||
- ESP32-S3 TWAI peripheral, 500 kbps, **LISTEN_ONLY** mode (cannot disturb the bus — good).
|
||||
- Falls back to dummy simulated data when CAN is off or failing.
|
||||
- Configured message map:
|
||||
|
||||
| ID | Byte(s) | Mapped to |
|
||||
|--------|---------|-----------|
|
||||
| 0x4F | 0 | Coolant temp |
|
||||
| 0x55 | 7 | Oil temp |
|
||||
| 0x201 | 3 | Gearbox oil temp |
|
||||
| 0x1001 | 0, 1 | Gear position / gear number |
|
||||
| 0x101F | 0–1 | Battery voltage (16-bit BE) |
|
||||
|
||||
> [!warning] These IDs are almost certainly placeholders, not real BMW IDs.
|
||||
> Two red flags: (1) `0x1001` and `0x101F` exceed `0x7FF`, the maximum for standard 11-bit CAN identifiers — BMW E-series PT-CAN of the M57N era uses 11-bit frames `(unverified)`, so these would never match. (2) None of the five IDs appear in community BMW reverse-engineering documentation. The map needs to be rebuilt from real bus captures or a trustworthy source before any of the displayed data can be believed.
|
||||
|
||||
## Verification plan
|
||||
|
||||
1. Get a raw capture of the actual bus (candump / Savvy CAN / cheap USB-CAN dongle) with the engine running. File the log into `raw/`.
|
||||
2. Identify candidate IDs by watching which bytes track known physical behavior (rev the engine, warm it up, shift gears).
|
||||
3. Cross-check against community DBC files / reverse-engineering wikis for the donor vehicle.
|
||||
4. Update `automotive_data.h` `(repo)` and mark each mapping `(verified)` here only after it matches reality on the live bus.
|
||||
|
||||
## Signal-source caveat
|
||||
|
||||
Coolant/oil temp come from the DDE, but **gearbox temp and gear position come from the EGS module** — they only exist on the bus if the swap retained the automatic transmission and its ECU. `(unverified)` → [[open-questions]]
|
||||
|
||||
## Related
|
||||
|
||||
[[bmw-m57n-engine]] · [[esp32-s3-touch-lcd-5b]] · [[open-questions]]
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
type: concept
|
||||
tags: [architecture, uart]
|
||||
updated: 2026-07-15
|
||||
---
|
||||
|
||||
# Dual-Controller Architecture
|
||||
|
||||
The system is two ESP32-S3 boards linked by UART (repo):
|
||||
|
||||
```
|
||||
BMW M57N CAN bus ──▶ Controller A ──UART 5Hz──▶ Controller B
|
||||
(this repo: (ESP32-S3-LCD-1.3,
|
||||
5" 1024×600 display) 1.3" round display)
|
||||
```
|
||||
|
||||
- **Controller A** — [[esp32-s3-touch-lcd-5b]]: listens to the CAN bus, renders the main UI, and re-broadcasts a compact sensor packet over UART1 (GPIO 43/44, 115200 baud) at 5 Hz.
|
||||
- **Controller B** — ESP32-S3-Touch-LCD-1.3: a secondary display fed purely by that UART stream. Lives in a sibling repo (`bmw-patrol/` parent directory).
|
||||
|
||||
## UART packet (repo)
|
||||
|
||||
`0xAA` start · version · length · `automotive_data_t` (gear position, gear number, coolant/oil/gearbox temps, battery voltage, fault codes) · XOR checksum · `0x55` end. Full spec in the repo's UART protocol documentation (commit 49aaf06).
|
||||
|
||||
## Why it matters for the wiki
|
||||
|
||||
Any change to what data we extract from the [[can-bus-integration]] ripples into this packet **and** into Controller B's parser — both ends must move together.
|
||||
|
||||
## Related
|
||||
|
||||
[[esp32-s3-touch-lcd-5b]] · [[can-bus-integration]]
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
type: entity
|
||||
tags: [hardware, waveshare, display]
|
||||
updated: 2026-07-15
|
||||
---
|
||||
|
||||
# Waveshare ESP32-S3-Touch-LCD-5B
|
||||
|
||||
Controller A of the [[dual-controller-architecture]] — the main in-cabin display.
|
||||
|
||||
> [!note]
|
||||
> The raw source `raw/ESP32-S3-Touch-LCD-5B.md` (presumably a clip of the Waveshare product page) is currently **empty** — re-clip it and ingest to flesh this page out with official specs.
|
||||
|
||||
## Specs (repo)
|
||||
|
||||
- ESP32-S3 dual-core @ 240 MHz, 16 MB flash, 8 MB **OPI** PSRAM
|
||||
- 5-inch 1024×600 RGB LCD (RGB888 parallel interface), capacitive touch
|
||||
- Runs LVGL 8.4.0 at ~50 FPS via ESP32_Display_Panel v1.0.4
|
||||
|
||||
## Pin usage in this project (repo)
|
||||
|
||||
| Function | Pins | Notes |
|
||||
|----------|------|-------|
|
||||
| CAN (TWAI) | GPIO 15 TX / GPIO 16 RX | 500 kbps, LISTEN_ONLY; external transceiver required — which one? → [[open-questions]] |
|
||||
| UART1 → Controller B | GPIO 43 TX / GPIO 44 RX | 115200 baud, exposed on the board's RS485 terminal block |
|
||||
| USB Serial | UART0 | debug @ 115200 |
|
||||
|
||||
## Hard-won hardware lessons (repo)
|
||||
|
||||
- 8MB OPI PSRAM demands `qio_opi` memory type + custom board JSON — wrong setting causes screen flicker/drift.
|
||||
- LCD wants a 16 MHz pixel clock with correct PCLK polarity.
|
||||
- Backlight must be manually sequenced at boot to avoid a white flash.
|
||||
|
||||
## Open hardware questions
|
||||
|
||||
- Automotive power: the board wants 5 V; a vehicle supplies 9–16 V with load-dump transients. What regulator/protection is planned? → [[open-questions]]
|
||||
- CAN transceiver part and wiring (the TWAI peripheral is only the controller — GPIO 15/16 are logic-level).
|
||||
|
||||
## Related
|
||||
|
||||
[[dual-controller-architecture]] · [[can-bus-integration]]
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
type: synthesis
|
||||
tags: [meta, todo]
|
||||
updated: 2026-07-15
|
||||
---
|
||||
|
||||
# Open Questions
|
||||
|
||||
The research frontier. Answering any of these should trigger updates across the wiki. Ordered roughly by how much they block progress.
|
||||
|
||||
## Blocking
|
||||
|
||||
1. **What are the real CAN IDs for the M57N data we want?** The firmware's current map is placeholder-quality — two IDs aren't even valid 11-bit identifiers. Needs a live bus capture or a trusted source. → [[can-bus-integration]]
|
||||
2. **Which donor vehicle / DDE version is this engine from?** (E46? E39? E53? Range Rover Td6?) The CAN matrix differs per platform. → [[bmw-m57n-engine]]
|
||||
3. **Is the transmission ECU (EGS) on the bus?** Gearbox temp and gear position come from the EGS, not the engine ECU. If this is a manual swap or the EGS was removed, those two display fields have no data source. → [[can-bus-integration]]
|
||||
|
||||
## Project context
|
||||
|
||||
4. **What vehicle is the engine going into?** The parent directory is named `bmw-patrol` — is this an M57N swap into a Nissan Patrol (a well-known diesel swap)? This shapes wiring, power, and what other bus traffic exists. `(unverified guess)`
|
||||
5. **Standalone harness or full donor loom?** Affects which modules broadcast.
|
||||
|
||||
## Hardware
|
||||
|
||||
6. **CAN transceiver**: which part (SN65HVD230? TJA1050?) and how is it wired to GPIO 15/16? → [[esp32-s3-touch-lcd-5b]]
|
||||
7. **Automotive power supply**: 12 V vehicle → 5 V board conversion, transient/load-dump protection, ignition-switched vs constant power.
|
||||
8. **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)`
|
||||
|
||||
## Sourcing wishlist
|
||||
|
||||
- Waveshare ESP32-S3-Touch-LCD-5B product page + schematic (the current raw clip is empty — re-clip it)
|
||||
- A community DBC / CAN-ID list for the donor platform
|
||||
- A real candump log from the engine running
|
||||
Reference in New Issue
Block a user