From fa62a07993beeab54f3bc707ab6c963ec3beff76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Martin?= Date: Sat, 3 Oct 2026 21:37:29 +0200 Subject: [PATCH] README: Firmware Updates over Wi-Fi and from the SD card Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index ddd1e58..b81fc26 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,21 @@ This runs the host-side unit tests (`test/`, `native` environment), then builds sudo usermod -aG dialout "$USER" ``` +## Firmware Updates over Wi-Fi (OTA) + +Once the Cardputer runs an OTA-capable firmware (flashed once over USB), updates can go over Wi-Fi: + +```sh +scripts/ota_keygen.sh # once: creates the signing key (see ADR 0003) +scripts/flash.sh --ota 10.39.39.12 # build, sign and push; or set RORO_OTA_HOST +``` + +The device shows the push address in **Settings → Firmware**. It installs a correctly signed update right away, restarts (waiting up to 60 s if you're typing), and runs the new firmware on **Probation**. If the new firmware crashes, or can't reconnect Wi-Fi within 3 minutes, it rolls back to the previous one and says so. + +To install from the SD card instead, copy the `.ota` file from `.pio/build/cardputer-adv/` into `/updates` on the card, then use **Settings → Firmware**. + +**The private key** lives in `~/.config/roro9stack/ota-key.pem` and must never be committed. If it's lost, generate a new pair and flash once over USB. + ## Development aids `scripts/serial_log.sh [seconds] [command…]` records the serial output, and can send commands to the firmware first. For example, `scripts/serial_log.sh 30 short sleep:12 burst` sets short screen timeouts, waits 12 s, then sends a burst of Toasts.