Repository navigation
Conversation
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.
Refresh the firmware dependencies and remove failure modes that could lose an attempt, stall a station, or crash on external data. Failed solve submissions now show the reason on the device, and late replies can only reset the attempt with the matching session ID. The competition workflow and production server wire format are preserved.
Changes
static mutand unchecked handling of external data. Use bounded protocol/error/log buffers, request slots with timeouts, and direct JSON serialization into the transmit buffer. Host tests compare outgoing packets with the previous serialization.e2efeature and injected test packets with esp-emu bus models, replay scenarios, fuzzing, and competition simulations. Sim patches live in this repository and builds restore Cargo.lock. The sim console exposes heap statistics during provisioning, and replay files always execute every step instead of inheriting the fuzzer's duration cutoff.Release measurements
Measurements at
5da253d(before the BLE address-type fix) useRELEASE_BUILD=3.0.0,--no-default-features --features v3|v4, the RISC-V target, and--release. Image sizes are application binaries fromespflash save-imagewithout--merge. Master image baselines below are retained from the previous PR description; they were not remeasured in this session.Static data is
.data + .data.wifi + .bss + .noinit, minus the 112 KiB ordinary heap. Stack figures are the linker-reserved region, not measured stack usage. AP provisioning peaks were remeasured after the Wi-Fi cap, with the setup panel requested. Normal peaks cover competition/fuzz/reconnect paths over plain websocket traffic; these runs do not validate TLS/BLE heap peaks. These sim heap measurements precede the final flash-capacity fix; image/static/stack sizes include it.Validation
9d3a5ddcc5a80ceba711a4d158154f85a4a02298: push CI and pull-request CI.Latest commits
e1ec289and9d3a5ddfix BLE address types, local identity, and resumed-bond encryption handling. Formatting, all 29 host tests, v3/v4 clippy/release builds, and v3/v4 sim clippy pass locally. All GitHub checks pass for9d3a5dd. These checks do not establish bonded BLE operation on hardware.v4 hardware validation
Connected ESP32-C3 rev 0.4, 4 MB flash. Saved a full flash backup before testing; preserved the PC's staged firmware manifest/lockfile edits by using isolated refresh worktrees.
Reproduced the unpatched NVS boot failure, then verified the capacity-cache fix opens the same NVS data without an erase. Wi-Fi, DHCP, mDNS and TLS websocket upgrade succeed on real hardware.
Normal-firmware TLS/idle/reconnect peak: 105,188 of 169,984 heap bytes; measured stack high-water mark 21,428 of 64,768 bytes (default v4 build with sleep/pads, unlike the release measurement rows above). Recovered from three test-server restarts; current heap returned to 98,188 bytes each time. BLE and OTA are not included in this peak.
Idle sleep passed: after five minutes without activity the device closed its websocket with code 4000, "Going into sleep mode". USB restart was used afterwards; physical button wake is not covered.
Authenticated OTA passed using the production connector, TLS, 4 KiB chunks, and RX/TX buffers capped at 12. Full 1,338,976 B transfers took 47.341–51.911 s (25.19–27.62 KiB/s); read-back verification took about 0.70 s. The new slot booted, marked itself valid, and reconnected. Restored the normal 3.0.0 build by OTA afterwards.
Fault tests passed: a damaged appended image digest was rejected by the bootloader, which booted the previous valid slot; an image one byte larger than the OTA partition was rejected without reboot; dropping the server during transfer triggered the existing recovery reset and retained the previous valid image. Each recovered over TLS. These cover invalid-image fallback, not rollback of an otherwise bootable app that fails to mark itself valid.
No application panic/watchdog crash markers appeared. Final restored-build idle heap stayed at 98,236 bytes (103,348 B peak), with stack high-water mark 21,428 B. The normal heap logger pauses during OTA, so OTA peak heap was not measured.
Transient OLED flush timeouts and battery-gauge communication errors appeared during some boots/transfers; the gauge recovered. Display appearance and physical inputs still need confirmation.
Temporary USB-controlled lab build: one software sleep/wake cycle with an unpaired BLE connection retry active passed. Heap used 133,888 B before sleep, 59,456 B asleep, and 98,268 B after Wi-Fi/TLS recovery; peak 140,704 of 169,984 B. This does not establish bonded BLE recovery or physical button wake.
The PC’s Baseus BA04 (Barrot
33fa:0001) receives pairing requests, but its remote-feature query never completes in captures; both connection directions stall. USB reset restores advertising after a controller power-cycle failure, but has not fixed pairing. Bonded BLE tests remain blocked by this lab setup; no adapter fix is claimed. A USB port disable/enable then left the BA04 failing USB descriptor/configuration reads, before the Bluetooth driver could bind. BlueZ and kernel package integrity checks report zero altered files, and the USB hub has no power-switching support; a remote host reboot also failed to recover the adapter, so recovery still needs a physical replug. No permanent driver or Bluetooth configuration changes were made. Temporary lab instrumentation is not included in this PR.Final board state: normal default v4
9d3a5ddbuild, with no lab instrumentation or diagnostic dependency patches; saved Wi-Fi restored, TLS reconnected, heap stable at 98,188 B used /101,644 B peak of 169,984 B, stack 21,428/64,784 B. A temporary five-second RTC deep-sleep test produced the expected USB disappearance/reappearance; console loss prevented wake-reason capture, so this does not validate GPIO wake.Hardware checks still required
The broader refresh still needs physical-device checks for display initialization/partial updates, physical BLE pairing and sleep/wake, button and Stackmat/pad timing, rollback of an unconfirmed bootable image, and watchdog/crash reporting.
Venue test mode and enabling sleep in competition simulations are outside this change.