link: separator in the Controller B update log line; wiki: B update verified end-to-end
Firmware / build (push) Successful in 7m29s
Firmware / build (push) Successful in 7m29s
This commit is contained in:
@@ -299,8 +299,9 @@ void tick() {
|
||||
was_match = p.heard && p.key_match;
|
||||
if (p.heard && p.st.ota_phase != last_phase) {
|
||||
if (last_phase != 0xFF || p.st.ota_phase != LINK_OTA_IDLE)
|
||||
print("[link] Controller B update: %s%s%s%s", phaseName(p.st.ota_phase),
|
||||
p.st.latest[0] ? " latest " : "", p.st.latest,
|
||||
print("[link] Controller B update: %s%s%s%s%s", phaseName(p.st.ota_phase),
|
||||
p.st.latest[0] ? ", latest " : "", p.st.latest,
|
||||
p.st.ota_phase == LINK_OTA_FAILED ? " - " : "",
|
||||
p.st.ota_phase == LINK_OTA_FAILED ? p.st.message : "");
|
||||
last_phase = p.st.ota_phase;
|
||||
}
|
||||
|
||||
@@ -198,3 +198,7 @@ Second tag build (pioarduino core fork in the workflow) succeeded: release `v0.1
|
||||
## [2026-09-27] update | Controller B updates from A's screen: link_peer, two-way maintenance frames, Updates page with two cards
|
||||
|
||||
Implemented A's half of B's OTA (design in B's wiki `controller-b-ota`). Shared `automotive_data.h` (+ new `link_secure.h`, both byte-identical in the two repos): `STATUS` 0x03 B → A, `PAIR` 0x04 A → B wire-only, `SECURE` 0x05 A → B (AES-256-GCM under the pairing key; inner `OTA_CMD` / `WIFI_CREDS`), `PACKET_MAX_PAYLOAD` 64 → 160, `PACKET_VERSION` unchanged (DATA/CONFIG bytes identical). New `src/modules/link_peer.cpp`: pairing key in NVS `linkpeer`, `link pair` sends the key ×3 over UART1 only (`UARTManager::sendWire()`), B's STATUS kept + logged, automatic push of the remembered Wi-Fi network to B (hash-compared, ≥ 15 s apart, FORGET when A forgets), `requestCheck/requestInstall` for the screen behind `Ota::isParked()` + A on Wi-Fi. `EspNowLink` gained a receive callback (IDF 5.5 `esp_now_recv_info_t`) and `sendTo()`; `WiFiManager::getSavedCredentials()` (for LinkPeer only, never printed). Settings → Updates rebuilt as two cards (Controller A / Controller B) that fit the 484 px page without scrolling. Bench: B heard within seconds (`link status`: MAC, `dev`, heap 234 KB), refusals correct; `link pair` cannot be confirmed because **no wire is connected on the bench** (B reports `uart silent`). Build notes: `pio` from PowerShell only (idf_tools refuses MSYS); first build after the B project reinstalls Arduino 3.3.3 and may fail once with a `TypeError` - rerun.
|
||||
|
||||
## [2026-09-27] verify | Controller B updated from A's console, end to end (details in B's wiki log)
|
||||
|
||||
With the wire connected: pairing, credential push, check and install of B's first signed release `v0.1.0` all worked from A's `link` console; B rebooted and confirmed. A's side needed one cosmetic fix (missing separator in the "Controller B update: failed - <reason>" log line), rebuilt and flashed COM14. Left for the user: tap Check / Install on the Controller B card of Settings → Updates on the next B release and watch B's progress line.
|
||||
|
||||
@@ -108,7 +108,7 @@ Wi-Fi must be joined first — Settings → Wi-Fi (remembered from then on) or `
|
||||
|
||||
## Controller B (implemented 2026-09-27)
|
||||
|
||||
The 2026-09-26 idea (A streams B's image over ESP-NOW) was dropped for a **pull design** the user chose on 2026-09-27: B downloads its own signed release (target `patrol-b`, B's repo, same key) over Wi-Fi; A only hands over the credentials and the trigger. Full design, verification state and the first-pairing procedure live in B's wiki (`../../ESP32-S3-LCD-1.3/wiki/pages/controller-b-ota.md`). A's side: `src/modules/link_peer.cpp` - `link pair` sends a random key over the UART wire once (never by radio; both repos are public), B's `STATUS` frames (version, phase, progress) arrive over ESP-NOW unicast, credentials and OTA commands go to B inside AES-256-GCM `SECURE` frames, and Settings → Updates gained a **Controller B** card (Installed / Latest / Check / Install) next to Controller A's. B's install is behind the same parking gate plus "A must be on Wi-Fi" (same AP ⇒ same channel ⇒ B's progress frames keep arriving). Console: `link status | pair | unpair | creds | ota check | ota install [force] | ota rollback`. Verified on the bench: STATUS frames and every refusal path; pairing itself waits for the wire to be connected.
|
||||
The 2026-09-26 idea (A streams B's image over ESP-NOW) was dropped for a **pull design** the user chose on 2026-09-27: B downloads its own signed release (target `patrol-b`, B's repo, same key) over Wi-Fi; A only hands over the credentials and the trigger. Full design, verification state and the first-pairing procedure live in B's wiki (`../../ESP32-S3-LCD-1.3/wiki/pages/controller-b-ota.md`). A's side: `src/modules/link_peer.cpp` - `link pair` sends a random key over the UART wire once (never by radio; both repos are public), B's `STATUS` frames (version, phase, progress) arrive over ESP-NOW unicast, credentials and OTA commands go to B inside AES-256-GCM `SECURE` frames, and Settings → Updates gained a **Controller B** card (Installed / Latest / Check / Install) next to Controller A's. B's install is behind the same parking gate plus "A must be on Wi-Fi" (same AP ⇒ same channel ⇒ B's progress frames keep arriving). Console: `link status | pair | unpair | creds | ota check | ota install [force] | ota rollback`. **Verified end-to-end on the bench 2026-09-27**: `link pair` over the wire, automatic credential push, `link ota check` / `link ota install` from A's console took B from `dev` to `v0.1.0` (1,248,432 B in ~50 s), B rebooted, reported `v0.1.0` and confirmed itself after 30 s. The Updates-page buttons share the same request functions but have not been tapped yet.
|
||||
|
||||
## Related
|
||||
|
||||
|
||||
Reference in New Issue
Block a user