Controller B OTA: link_peer (STATUS to A, PAIR from the wire, AES-GCM SECURE frames), updater ported from A, console, CI workflow, shared header v2 maintenance frames; wiki + docs
Firmware / build (push) Successful in 2m57s
Firmware / build (push) Successful in 2m57s
This commit is contained in:
@@ -15,6 +15,10 @@ BMW PT-CAN ──▶ Controller A (5B) ──UART 5 Hz──▶ Controller B (1.
|
||||
|
||||
Architecture rule: **B never touches CAN.** Anything B needs must be put into the packet by A. See `(sibling: 5B wiki → dual-controller-architecture)` for A's view of the same link.
|
||||
|
||||
## Maintenance frames (2026-09-27) — the link is no longer one-way
|
||||
|
||||
Three frame types were added for [[controller-b-ota]] without bumping `PACKET_VERSION` (DATA/CONFIG bytes unchanged): `STATUS` 0x03 (B → A, ESP-NOW unicast to A's MAC, every 5 s: B's version, update phase, heap), `PAIR` 0x04 (A → B, **UART wire only**: the shared key), `SECURE` 0x05 (A → B, ESP-NOW unicast, AES-256-GCM envelope for Wi-Fi credentials and OTA commands). `PACKET_MAX_PAYLOAD` grew 64 → 160. B's ESP-NOW receiver routes non-DATA/CONFIG types to `LinkPeer` and remembers A's MAC from the data frames; A's `EspNowLink` now has a receive callback and `sendTo()`. Verified 2026-09-27: B's STATUS reaches A (`link status` on A lists B's MAC, version, heap).
|
||||
|
||||
## Wire-level contract — protocol v2 `(repo, 2026-09-21; spec: 5B repo docs/UART_PROTOCOL.md)`
|
||||
|
||||
- One direction A → B, on **two transports at once**: UART1 115200 8N1 and **ESP-NOW broadcast** (channel 1; B hops 1–13 while silent and locks when frames arrive). B dedupes DATA frames on `packet_id` + `timestamp_ms`.
|
||||
|
||||
Reference in New Issue
Block a user