You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firmware is flashed over USB today (platformio.ini sets upload_port per controller). With
controllers mounted in racks, physical access for reflashing doesn't scale, and #26 unifies the
image so every device runs the same binary — making a fleet-wide OTA path both feasible and
necessary. The MQTT contract already anticipates this: enabled:false is documented as "remote
off, e.g. OTA," and #19 tracks quieting a device during an update.
Problem
No remote update mechanism exists — every firmware change requires USB access to each ESP32.
Transport is wired W5500 Ethernet, not WiFi, so the standard mDNS-based ArduinoOTA /
espota flow does not apply. OTA must work over the Ethernet client.
The two controllers form an A/B failover pair; updating the active one must not blind the rack.
Proposal
Pull-based HTTP OTA using the Arduino Update.h API over the existing W5500 EthernetClient.
The host (Radxa) serves the firmware binary; an MQTT command tells a target device to fetch and
apply it, then reboot. This reuses the broker + provisioning channel we already have rather than
introducing a new push protocol.
Decisions needed
Trigger & command topic — e.g. repacss/devices/<mac>/ota carrying firmware URL + version
expected checksum. Per-device vs rack-wide vs broadcast.
Binary source — Radxa HTTP endpoint serving the .bin; where versions live and how a
device knows its current vs available version.
Rollback — behavior on failed boot after flash (bad image, power loss mid-write). ESP32
rollback / OTA-data partition strategy.
Partition scheme — confirm the build uses a dual-app OTA partition table (default single-
app layout has no OTA slot); update platformio.iniboard_build.partitions if needed.
Ack/status — device reports OTA progress/result (downloading → verifying → applied → booted,
or failed+reason) back over MQTT so the host knows the outcome (relates to the Publish config_ack after applying config #13 config_ack pattern).
Context
Firmware is flashed over USB today (
platformio.inisetsupload_portper controller). Withcontrollers mounted in racks, physical access for reflashing doesn't scale, and #26 unifies the
image so every device runs the same binary — making a fleet-wide OTA path both feasible and
necessary. The MQTT contract already anticipates this:
enabled:falseis documented as "remoteoff, e.g. OTA," and #19 tracks quieting a device during an update.
Problem
ArduinoOTA/espota flow does not apply. OTA must work over the Ethernet client.
Proposal
Pull-based HTTP OTA using the Arduino
Update.hAPI over the existing W5500EthernetClient.The host (Radxa) serves the firmware binary; an MQTT command tells a target device to fetch and
apply it, then reboot. This reuses the broker + provisioning channel we already have rather than
introducing a new push protocol.
Decisions needed
repacss/devices/<mac>/otacarrying firmware URL + version.bin; where versions live and how adevice knows its current vs available version.
Update.end(); refuse onmismatch. Consider signed images given the control-channel spoofing concern raised in Prod network design: isolate rack telemetry segment + broker bootstrap (DHCP) #24.
target
enabled:false(Firmware: accept enabled:false to support remote disable #19) so its peer takes over before it reboots. Never update both at once.rollback / OTA-data partition strategy.
app layout has no OTA slot); update
platformio.iniboard_build.partitionsif needed.or failed+reason) back over MQTT so the host knows the outcome (relates to the Publish config_ack after applying config #13 config_ack pattern).
Considerations
auth/TLS and image signing (Prod network design: isolate rack telemetry segment + broker bootstrap (DHCP) #24 discovery-security thread).
Update.h+EthernetClientstreaming fits in RAM/flash.Acceptance criteria
reboots into it.
Files affected
ESP32-Firmware/platformio.ini— OTA partition table (board_build.partitions), build/version metadataESP32-Firmware/src/TelemetrySender.cpp— MQTT command handling for the OTA topicESP32-Firmware/src/OTA module (fetch +Update.happly + verify + status)ESP32-Firmware/src/main.cpp— coordinate OTA with failover /enabledgatingdocs/mqtt-contract.md— define the OTA command/status topics + payload schemaRelates to #19 (remote disable during OTA), #24 (control-channel auth/signing), #13 (ack pattern),
#26 (unified image).