Add LongFred firmware update over Soft-AP, LAN, and USB - #2
Open
keskad wants to merge 3 commits into
Open
Conversation
Queue POST /api/v1/firmware as an updateFirmware job, discover STA hosts via mDNS, and keep settings programming on Soft-AP only. Co-authored-by: Cursor <cursoragent@cursor.com>
Scan serial ports and flash ELF, merged .bin, or .app.bin with --mode usb so the first dual-slot install does not require a manual espflash invocation. Co-authored-by: Cursor <cursoragent@cursor.com>
espflash and the firmware POST block without progress frames, so the 10s client idle dropped the watch. Heartbeat every 3s, honour job cancel, and default update-firmware watch idle to the flash/POST deadline. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
7 tasks
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.
Summary
updateFirmware/wireless-programmer update-firmware --mode ap|lan|usbto upload LongFred firmware..app.binto/api/v1/firmware(120 s, no retries). LAN discovery via mDNS_longfred-ota._tcp(scan --mode lan) or--host.espflashon a serial port (ELF, merged.bin, or.app.bin);scan --mode usblists ports.job.watchheartbeat every 3 s so a 10 s idle client does not drop the stream.job cancelkillsespflashand aborts an in-flight POST. CLI default watch idle is 180 s (USB) / 120 s (HTTP) when--timeoutis omitted.supportsFirmwareUpdate(LongFred true, WiFred false). Stacked onfeat/runtime-and-fake-mode(Wire the programming runtime and add fake Soft-AP mode #3).Test plan
cargo test --workspaceandcargo clippy --workspace --all-targets -- -D warningswireless-programmer helloshowssupportsFirmwareUpdateon longfredPOST /api/v1/firmwarewith a non-empty body returns 200update-firmware --mode ap --driver longfred --key <bssid> --file *.app.binafter the 8 s chordscan --mode lanandupdate-firmware --mode lan --host <ipv4> --file *.app.binupdate-firmware --mode usb --port /dev/ttyUSB0 --file <elf> --partition-table partitions.csvstreams progress past 10 sprogramis unchanged (Soft-AP settings only)