Repository navigation
feat: web firmware update with verification and rollback (Firmware tab) - #17
Merged
Merged
Conversation
…b) — closes #16 New "Firmware" tab (/firmware) showing installed version, running partition, validation state and free space, plus an upload form for the modbusproxy-<ver>-firmware.bin from GitHub Releases. Verification: - Browser, before uploading: ESP32 app image header (0xE9, chip ESP32; warns when factory.bin is picked), project marker MBPXY-FW:<ver>;, size, version comparison (newer / same / downgrade) and a mandatory disclaimer checkbox. - ESP32, while receiving: writes to the free OTA partition via Update, scans the stream for the project marker and aborts without touching the boot partition if it is missing; Update.end() checks the SHA-256. Rollback: verifyRollbackLater() (extern "C", so it overrides the core's weak C symbol) keeps a freshly installed image pending until it has run 30 s with network (or reached the Setup portal). If it reboots earlier the bootloader returns to the previous image. Also covers ArduinoOTA. The proxy pauses during the upload and the OLED shows progress, sharing helpers with ArduinoOTA. The version now lives in #define FW_VERSION, read by the firmware, CI and pre_upload.py; FW_MARKER embeds it in the binary. /api/status adds firmware_version. Release notes explain the web update. i18n ES/EN/DE, READMEs and changelog updated. Bump to 6.2-0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #16
Summary
/firmware): installed version, running partition (app0/app1), validation state, free space, disclaimer and upload form.0xE9, ESP32 chip; tells you to usefirmware.biniffactory.binis picked), project markerMBPXY-FW:<ver>;, size, version comparison (newer / same / downgrade). The button is enabled only with a valid file and the disclaimer accepted.Update.end()validates SHA-256.#define FW_VERSION(firmware, CI andpre_upload.py);/api/statusaddsfirmware_version.Test plan (test proxy .213 + EMMA emulator)
/firmwarerendersWrong Magic Byte), fake0xE9header (no marker), 6.1-0factory.bin, 6.1-0firmware.bin(pre-marker)6.2-99that reboots at 10 s → bootloader returned to6.2-0, stable and validatedverifyRollbackLater()neededextern "C"— without it the core's weak C symbol won and rollback was silently disabledNote: devices on < 6.2-0 have no Firmware tab, so the first update to 6.2-0 must be via OTA or USB (stated in the release notes).
🤖 Generated with Claude Code