Repository navigation
A kit that loses Wi-Fi joins again on its own (W-1056) - #372
Merged
Merged
Conversation
An always-awake kit joined Wi-Fi once, at boot, and was then kept on it by the Arduino core's auto-reconnect alone. That retries only some disconnect reasons and stops for good on the rest, so on 15 Oct 2026 both kits sat off a working network with the slashed Wi-Fi mark up until they were unplugged. While the station is down, the loop now joins the saved network again every 30 s. Refs: W-1056
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.
At 9:03 AM on 15 Oct 2026 UniFi's automatic channel optimization changed the Front AP U6+'s channel (5 GHz 64 → 149; the AP stayed up, 17 days). Both kits were on it, on 2.4 GHz at −40 and −53 dBm, and UniFi logged both disconnecting that minute. Neither joined again: Cloud saw no check-in from either kit for the next 13 hours, and UniFi logged no join attempt. The EE03 came back only when it was unplugged (10:20 PM). The same optimization had moved the 2.4 GHz channel on 12 Oct (6 → 11), and that time both kits rejoined, so whether a kit came back depended on the disconnect reason.
Why. An always-awake kit joins Wi-Fi once, in
setup()(ensureWifi), and is then kept on it by the Arduino core's auto-reconnect alone. The core retries only the reasons in_is_staReconnectableReason(STA.cpp) and stops for good on the rest. A join that fails at boot is never tried again either. A deep-sleep kit is not affected: it callsensureWifion every wake.What changed.
keepWifi(), called on every pass ofloop(): while the station is down (and the setup portal is not open), it callsWiFi.begin()on the saved network everyFF_WIFI_REJOIN_MS(30 s). The first call waits one gap, so the core's own retry goes first.WiFi.begin()rather thanreconnect(), because it also starts the station if it was stopped.Verified.
pio runforrelease,release_ee02,xiao_ee03,ee02andgeneric_benchbuilds. The server tests that read the firmware's sources pass.Left. Not seen on a kit yet. The check is a kit on this build rejoining within a minute after its access point changes channel (UniFi: the AP's channel can be changed by hand to provoke it).
Refs W-1056