Feature: Station-mode Fallback and Periodic Reconnection Loop (#112)#114
Open
dfry-lhzn wants to merge 5 commits into
Open
Feature: Station-mode Fallback and Periodic Reconnection Loop (#112)#114dfry-lhzn wants to merge 5 commits into
dfry-lhzn wants to merge 5 commits into
Conversation
…JHC#111) - Adds CONFIG_REQUIRE_PMF_S to allow users with modern hotspots (like Pixel 9 Pro) to enforce Protected Management Frames. - Defaults PMF to capable but not required to preserve compatibility with legacy WPA2 networks. - Sets sae_pwe_h2e to WPA3_SAE_PWE_BOTH where available to enable WPA3 SAE flow.
Replaces the hard ESP.restart() failure loop when Station connection exhausts its retries. Instead: - State machine drops to AP-Fallback mode headlessly via apSetup() - Triggers non-blocking background async scans WiFi.scanNetworks(true) - Polls for configured hotspot presence over the air - Transitions seamlessly back to Station mode if detected - Configured via new parameter CONFIG_STATION_SCAN_INTERVAL_S exposed to Web UI (default: 30000 ms / 30s)
Intercepts CONFIG_MDNS_NAME_S (default value: "wibl") and assigns it using WiFi.setHostname() and WiFi.softAPsetHostname() respectively prior to network connection. Ensures tethered networks explicitly register the logger.
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.
Stacked on #113. Review #113 first.
Resolves #112
This PR addresses the indefinite fallback behavior observed when the logger transitions into AP-Mode due to a missing target Station network. It implements a non-blocking background scanner that gracefully restores the Station connection whenever the target Hotspot returns.
Key Changes
AP-Fallback, theConnectionStateMachinetriggers a non-blockingWiFi.scanNetworks(true). If the target SSID is spotted, it transitions toSTATION_CONNECTING.WIFI_AP_STA. This ensures the logger can continue hosting its configuration access point while the Station interface asynchronously scans the airways in the background.WiFi.setHostnameis now executed prior to interface initialization on boot, binding the custommDNSproperty to the DHCP negotiation so it correctly resolves instead of leaving it stranded as 'espressif'.WiFi.begin(ssid, pass)was forcefully overriding the structure memory. It now builds thewifi_config_tcleanly to preserve SAE and PMF constants and performs a hardWiFi.disconnect(true)during transition to kill underlying SDK tracking states from stale attempts.