Wiki: Controller B OTA verified end-to-end (pair over the wire, credential push, dev -> v0.1.0 from A); open question 12 answered
Firmware / build (push) Successful in 5s
Firmware / build (push) Successful in 5s
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
---
|
||||
type: concept
|
||||
tags: [ota, wifi, esp-now, security, design, verified]
|
||||
tags: [ota, wifi, esp-now, security, verified]
|
||||
updated: 2026-09-27
|
||||
---
|
||||
|
||||
# Over-the-air updates for Controller B
|
||||
|
||||
**Status 2026-09-27: implemented on both controllers, bench-tested up to the pairing step.** B pulls its own signed release from Gitea over Wi-Fi; A hands B the network credentials and the trigger over the existing link, and shows B's progress on its own Updates page. Design chosen by the user over "A streams the image through ESP-NOW" (comparison below). Everything reuses A's proven pipeline ([[ota-updates]] in the sibling wiki).
|
||||
**Status 2026-09-27: implemented on both controllers and VERIFIED END-TO-END on the bench - B went from `dev` to `v0.1.0` on a command typed on A, rebooted and confirmed itself.** B pulls its own signed release from Gitea over Wi-Fi; A hands B the network credentials and the trigger over the existing link, and shows B's progress on its own Updates page. Design chosen by the user over "A streams the image through ESP-NOW" (comparison below). Everything reuses A's proven pipeline ([[ota-updates]] in the sibling wiki).
|
||||
|
||||
## What is verified, what is not
|
||||
|
||||
@@ -14,9 +14,11 @@ updated: 2026-09-27
|
||||
|---|---|
|
||||
| B → A STATUS frames (version, phase, heap, uptime) over ESP-NOW unicast | `(verified 2026-09-27)` A's console `link status` lists B's MAC, `dev`, heap 234 KB; A's Updates page shows the Controller B card |
|
||||
| Gates on both sides (unpaired → refused, no credentials → refused, key mismatch → refused) | `(verified 2026-09-27)` each refusal text seen on the consoles |
|
||||
| `link pair` over the UART wire | **not yet**: the bench had no wire connected when tested (B: `uart=0 ... uart silent`). Needs `485_A → IO1`, GND → GND, 120 Ω switch OFF ([[controller-link]] bench wiring) |
|
||||
| Encrypted credential handoff, B joins the network | not yet (needs pairing) |
|
||||
| `link ota check` / install from A's screen, first signed B release | not yet (needs pairing + release `v0.1.0` of this repo) |
|
||||
| `link pair` over the UART wire | `(verified 2026-09-27 21:2x)` wire `485_A → IO1`, ground shared through the USB hub only. A: `PAIR sent over the wire 3 time(s); new key fingerprint A9B7`; B: `PAIRED over the wire ... A = 30:ED:A0:17:B2:4C` (+ one "re-confirmed" for the repeats); A: `Controller B confirmed pairing (fingerprint A9B7)` within 5 s |
|
||||
| Encrypted credential handoff | `(verified)` A pushed `ArtServis` on its own right after pairing; B: `Wi-Fi credentials for 'ArtServis' stored`; `wifi status` on B lists the network |
|
||||
| `link ota check` from A | `(verified)` B joined the AP (IP 10.0.10.101, channel 1) in ~2 s, before the release existed: `no release published yet (push a v* tag)` reported back to A as phase *failed* + message; after the release: `latest release v0.1.0 (1248432 bytes, signature OK)`, A: `update available, latest v0.1.0` |
|
||||
| `link ota install` from A, first signed release `v0.1.0` | `(verified)` download + flash of 1,248,432 B into `app1` in ~50 s, `verified and installed v0.1.0`, reboot, banner `Firmware v0.1.0`, `NEW IMAGE, unconfirmed`, STATUS to A resumed within seconds (`firmware v0.1.0`), `firmware v0.1.0 confirmed - rollback cancelled` at 30 s; `ota status`: slot app1 state valid. Loop stack headroom after a job: 3.4 KB; heap 230 KB before/after |
|
||||
| Screen path (Controller B card on A's Updates page, B's on-screen notice line) | same request functions as the console commands, but the buttons have **not been tapped yet** and the "Updating v0.1.0 N%" line on B's round screen was not watched - user to confirm on the next update |
|
||||
|
||||
## Why pull, not push
|
||||
|
||||
@@ -71,8 +73,10 @@ Port of A's module. Differences: gate = link data (`rpm == 0`, lever P/N/unknown
|
||||
|
||||
## Risks / open
|
||||
|
||||
- **Wi-Fi + ESP-NOW coexistence on B while joined**: A and B on the same AP share the channel; B's receiver follows the AP channel while joined and hops back after `WiFi.disconnect(false)`. Not yet observed live.
|
||||
- **Internal RAM on B during TLS**: 235 KB free today; the job logs heap before/after. Measure once on the first check.
|
||||
- **Wi-Fi + ESP-NOW coexistence on B while joined**: `(verified)` A on `ArtServis` channel 1, B joined the same AP on channel 1, STATUS kept flowing during the download (A saw phase *installing*), B re-locked on channel 1 after `WiFi.disconnect(false)`. Untested: A **not** on Wi-Fi or on a different AP - by design A refuses B commands unless it is on Wi-Fi itself.
|
||||
- **Internal RAM on B during TLS**: `(verified)` 230.7 KB free before the job, 230.4 KB after; largest block 164 KB. No PSRAM tricks needed.
|
||||
- **UART wire quality on the bench**: with ground shared only through the USB hub, B logs bursts of `Checksum error on uart` (7 in a row at times) and an occasional `Framing error` / `Version mismatch got v0`; 2026-09-21 with a direct GND wire it was 0 errors. Harmless for the data (ESP-NOW copy wins, dedupe) and PAIR got through (sent 3×), but run a real GND wire next time → [[open-questions]] #1 / [[link-redundancy]].
|
||||
- **`link_status_t::message` is 32 bytes**: B's failure reason `no release published yet (push a v* tag)` arrived truncated at "(push". Cosmetic; lengthen if it ever matters.
|
||||
- **Pairing key lost** (NVS erase on either side): re-pair at home over the wire.
|
||||
- Two boards, one PlatformIO penv: the first `pio run` after switching projects reinstalls the other Arduino core and can fail once with a `TypeError`; run it again. Builds must be started from PowerShell, not Git Bash (`idf_tools.py` refuses MSYS).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user