Repository navigation
Conversation
Two faults found while commissioning a DUT on the bench: - After a Pi reboot on Debian 13, WLAN is rfkill soft-blocked and POST /api/wifi/ap_start fails with 'rfkill: WLAN soft blocked'. install.sh unblocked bluetooth only. It now unblocks wlan too, and ap_start/sta_join unblock it before starting (idempotent). - The ap_start handler reads the passphrase from 'pass', but Harness FSD Appendix D documented 'password'. A caller following the FSD got an OPEN network with no error. All three handlers now accept either key, and Appendix D documents 'pass' and the open-network behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onfigurable Setting only 'rfkill unblock wlan' did not hold on the bench: Raspberry Pi OS re-blocked WLAN within minutes, without a reboot, while no Wi-Fi country was set. After 'raspi-config nonint do_wifi_country CH' the AP stayed up. install.sh now sets WIFI_COUNTRY (default CH, matching the country_code the portal already wrote), and wifi_controller reads the same variable for hostapd.conf instead of hardcoding CH. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Called while the bench runs its AP (no sta_join before it), the station teardown released DHCP and flushed wlan0, removing the AP's own address: the AP kept beaconing and accepting associations but gave out no leases until it was restarted. Found by the music-buddy DUT (every join after a test fixture's cleanup sta_leave associated and then timed out on DHCP). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sta_join saved only ssid, password and channel of the running AP, so the AP that sta_leave brought back had no DNS forwarding and no NAT even when it was started with internet=True: DUTs rejoined but could no longer resolve names or reach NTP. Found by the music-buddy DUT (its clock never synchronised after a captive-portal test). 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.
Four Wi-Fi fixes (three commits) found while bringing up an ESP32-S3 DUT on a Pi testbench, plus a list of other findings (not fixed here) in case they are useful.
Fixes in this PR
1. WLAN rfkill soft-blocked →
ap_startfails (a40d842)After a Pi reboot on Debian 13, WLAN is rfkill soft-blocked and
POST /api/wifi/ap_startfails withrfkill: WLAN soft blocked.install.shunblocked Bluetooth only. It now unblocks WLAN too, andap_start/sta_joinunblock it before starting (idempotent).2.
passwordkey silently gives an open network (a40d842)The
ap_starthandler reads the passphrase frompass, but Harness FSD Appendix D documentedpassword. A caller following the FSD got an open network with no error (our DUT refused it with reason 210). All three handlers now accept either key; Appendix D documentspassand the open-network behaviour.3. No Wi-Fi country → WLAN re-blocked without a reboot (1ca431c)
A one-off
rfkill unblock wlandid not hold: Raspberry Pi OS re-blocked WLAN within minutes while no Wi-Fi country was set. Afterraspi-config nonint do_wifi_country CHit stayed up.install.shnow setsWIFI_COUNTRY(defaultCH, matching thecountry_codealready written to hostapd.conf), andwifi_controllerreads the same variable instead of hardcoding it.4.
sta_leavewithout a joined station breaks the AP's DHCP (64bb039)POST /api/wifi/sta_leavewhile the bench runs its AP (nosta_joinbefore it) still ran the station teardown (dhcpcd --release, address flush). The AP kept beaconing and accepting associations andap_statussaidactive, but no client got a DHCP lease until the AP was restarted.sta_leavenow returns early when no station is joined.Other findings (not fixed here)
/api/flashof an app image whose length is a multiple of 256 (0x145100) reported "Hash of data verified", but read-back showed the last byte as0xff, and the bootloader rejected the image. Other lengths were fine. Workaround: pad images to 4 KB. Not yet reduced to a minimal reproduction./api/serial/output).since=works. A combined "write, then wait for pattern" call would help.enter-portalassumes WiFiManager (form fields, and AP started when no credentials are stored). A DUT with its own portal (JSON API, started from its UI) has to be driven withsta_join+/api/wifi/httpinstead./api/serial/reset, and again ~3.5 s later when the serial proxy re-opens the port.ESP_RST_USB). So light sleep cannot be observed on the bench. Suggestion: skip the probe when a slot's DUT re-enumerates within a short window.302is mostly observed as its landing page), and there is no way to send a DNS query throughwlan0. Afollow_redirects: falseoption and a DNS-query endpoint would let captive portals be tested end to end.Thanks for the harness — it made on-hardware testing of this project possible.
🤖 Generated with Claude Code