Rename Controller A/B -> Main CTRL / Inst. Cluster (user); Sleep when the car is off: Settings switch, deep sleep on quiet CAN + idle screen, CAN RX wake, switch mirrored to the cluster; docs
Firmware / build (push) Successful in 7m22s
Firmware / build (push) Successful in 7m22s
This commit is contained in:
+23
-13
@@ -1,9 +1,9 @@
|
||||
# Commands cheat-sheet — both controllers
|
||||
|
||||
Everything you type to build, flash, watch and drive the two boards. Kept in the
|
||||
Controller A repo (this one); the Controller B repo's README points here.
|
||||
Main CTRL repo (this one); the Inst. Cluster repo's README points here.
|
||||
|
||||
| | Controller A | Controller B |
|
||||
| | Main CTRL | Inst. Cluster |
|
||||
|---|---|---|
|
||||
| Board | Waveshare ESP32-S3-Touch-LCD-5B (5" touch) | Waveshare ESP32-S3-LCD-1.3 (1.3" round) |
|
||||
| Repo / branch | `ESP32-S3-Touch-LCD-5B`, `main` | `ESP32-S3-LCD-1.3`, `master` |
|
||||
@@ -39,7 +39,7 @@ Windows ports move around: `pio device list` shows what is plugged in.
|
||||
|
||||
Run inside the respective repo folder.
|
||||
|
||||
### Controller A
|
||||
### Main CTRL
|
||||
```powershell
|
||||
cd <path>\ESP32-S3-Touch-LCD-5B
|
||||
pio run # build only (dev build, version "dev")
|
||||
@@ -48,7 +48,7 @@ pio run -t clean # wipe the build directory
|
||||
```
|
||||
First build after a `platformio.ini` change rebuilds the ESP-IDF core (~20 min, `custom_sdkconfig`); later builds take 1–3 min.
|
||||
|
||||
### Controller B
|
||||
### Inst. Cluster
|
||||
```powershell
|
||||
cd <path>\ESP32-S3-LCD-1.3
|
||||
pio run
|
||||
@@ -63,8 +63,8 @@ A USB flash writes bootloader, partition table, `boot_app0` and the app into slo
|
||||
## 3. Serial monitor
|
||||
|
||||
```powershell
|
||||
pio device monitor -p COM14 -b 115200 --dtr 0 --rts 0 --echo # Controller A
|
||||
pio device monitor -p COM10 -b 115200 --dtr 0 --rts 0 --echo # Controller B
|
||||
pio device monitor -p COM14 -b 115200 --dtr 0 --rts 0 --echo # Main CTRL
|
||||
pio device monitor -p COM10 -b 115200 --dtr 0 --rts 0 --echo # Inst. Cluster
|
||||
```
|
||||
Type a command, press Enter. `--echo` shows what you type. Ctrl+C leaves.
|
||||
|
||||
@@ -79,7 +79,7 @@ python tools\diag_session.py COM14 "diag pids" "diag vin" # scripted OBD probe
|
||||
|
||||
---
|
||||
|
||||
## 4. Controller A console
|
||||
## 4. Main CTRL console
|
||||
|
||||
Type `help` for the list. Unknown lines are reported.
|
||||
|
||||
@@ -110,7 +110,7 @@ ota install [force] download, verify, flash the idle slot, reboot (parked
|
||||
ota rollback boot the previous slot (parked only)
|
||||
```
|
||||
|
||||
### `link` — Controller B over the link
|
||||
### `link` — Inst. Cluster over the link
|
||||
```
|
||||
link status B's version, pairing, update phase, credentials
|
||||
link pair new shared key → B over the UART WIRE (bench, wire connected)
|
||||
@@ -132,6 +132,14 @@ diag raw on | off CANRAW frame logging
|
||||
diag status
|
||||
```
|
||||
|
||||
### `sleep` — deep sleep when the car is off (Settings → System switch, default OFF)
|
||||
```
|
||||
sleep status enabled?, and what currently keeps the board awake
|
||||
sleep on | off same as the switch; the Inst. Cluster follows through the CONFIG frame
|
||||
sleep now deep sleep immediately - wake = CAN bus activity (GPIO 16) or power cycle
|
||||
```
|
||||
Asleep, the USB port disappears; on the bench only a power cycle or the reset button wakes a Main CTRL that has no CAN bus.
|
||||
|
||||
### Diagnostics
|
||||
```
|
||||
mem internal heap, PSRAM, LVGL pool
|
||||
@@ -141,7 +149,7 @@ perf on [sec] | perf off
|
||||
|
||||
---
|
||||
|
||||
## 5. Controller B console
|
||||
## 5. Inst. Cluster console
|
||||
|
||||
```
|
||||
help
|
||||
@@ -153,6 +161,8 @@ ota status version, slot, rollback state
|
||||
ota check join Wi-Fi, ask Gitea for the latest release, leave
|
||||
ota install [force] download, verify, flash, reboot (parked only)
|
||||
ota rollback
|
||||
sleep status sleep flag received from the Main CTRL, link state
|
||||
sleep now deep sleep now; wakes on the UART wire (IO1) or every 60 s for a 4 s listen
|
||||
```
|
||||
B prints a stats line every 5 s (`applied=… uart … espnow …`) — `uart alive` means the wire works.
|
||||
|
||||
@@ -160,9 +170,9 @@ B prints a stats line every 5 s (`applied=… uart … espnow …`) — `uart al
|
||||
|
||||
## 6. Procedures
|
||||
|
||||
### Pair a Controller B (once per board pair)
|
||||
### Pair a Inst. Cluster (once per board pair)
|
||||
1. Wire: 5B terminal `485_A` → B `IO1`, GND → GND (a real wire, not just the USB hub), 5B's 120 Ω switch OFF. Both powered. B's stats line must say `uart alive`.
|
||||
2. A console: `link pair`. Within 5 s A logs `Controller B confirmed pairing (fingerprint XXXX)`; B logs `PAIRED over the wire`.
|
||||
2. A console: `link pair`. Within 5 s A logs `Inst. Cluster confirmed pairing (fingerprint XXXX)`; B logs `PAIRED over the wire`.
|
||||
3. `link status` on A: `key XXXX (matches)`. About 15 s later `Wi-Fi creds yes` (A pushes them by itself; `link creds` forces it).
|
||||
|
||||
The key lives in NVS on both boards and survives every flash and update. Re-pair only after an NVS erase, `link unpair`, or a board swap.
|
||||
@@ -175,10 +185,10 @@ git push --follow-tags origin main # A (B: origin master)
|
||||
One push, so only the tag build runs. Gitea builds, signs (`BMW_NISSAN_FIRMWARE_SIGNING_KEY`) and publishes `firmware.bin` + `manifest.txt`: A takes 7–20 min, B 2–5 min. Check: `https://git.infra.msai.al/<owner>/<repo>/releases`. Version strings must stay under 16 characters.
|
||||
|
||||
### Update A from the screen
|
||||
Settings → Updates → Controller A → **Check** → **Install vX.Y.Z** (parked, Wi-Fi joined). Progress bar, restart, `A vX.Y.Z` bottom-right. A reset in the first 30 s rolls back.
|
||||
Settings → Updates → Main CTRL → **Check** → **Install vX.Y.Z** (parked, Wi-Fi joined). Progress bar, restart, `A vX.Y.Z` bottom-right. A reset in the first 30 s rolls back.
|
||||
|
||||
### Update B from the screen
|
||||
Settings → Updates → Controller B → **Check** → **Install** (A on Wi-Fi, parked, B paired). B's round screen shows `Updating vX.Y.Z N%`, the card on A shows the percentage, B restarts and confirms itself after 30 s. Console equivalent: `link ota check`, `link ota install`.
|
||||
Settings → Updates → Inst. Cluster → **Check** → **Install** (A on Wi-Fi, parked, B paired). B's round screen shows `Updating vX.Y.Z N%`, the card on A shows the percentage, B restarts and confirms itself after 30 s. Console equivalent: `link ota check`, `link ota install`.
|
||||
|
||||
### Something is wrong after an update
|
||||
`ota rollback` on the affected controller's console (B: `link ota rollback` from A also works). A reset within 30 s of the first boot of a new image rolls back on its own.
|
||||
|
||||
Reference in New Issue
Block a user