Fix WiFi auto-connect skipping open networks - #2820
Open
sergarsilla wants to merge 1 commit into
Open
Conversation
Ninja-jr
pushed a commit
to Ninja-jr/Bruce_firmware
that referenced
this pull request
Aug 22, 2026
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.
Proposed Changes
The background auto-connect task
wifiConnectTaskskipped every OPEN(passwordless) network because it bailed out on
pwd == "". Known opennetworks are stored with an empty password, so they could never be joined
automatically.
wifiConnectTasknow treats an empty stored password as "unknown network"only for secured APs. When a scanned network's auth mode is
WIFI_AUTH_OPENand it is present in the stored credentials, it is connected without a
password. Behaviour for secured (WPA/WPA2/WPA3) networks is unchanged.
A small
BruceConfig::hasWifiCredential()helper distinguishes a known opennetwork (stored, empty password) from an unknown network (not stored), without
changing the credential storage format.
Types of Changes
Bugfix
Verification
wifiConnectTaskrun near that network.networks keep connecting exactly as before.
Builds clean for
lilygo-t-embed-cc1101; the change is board-agnostic.Testing
Not covered by automated tests (no harness for this path); verified by building
the firmware and by inspecting the connect path.
Linked Issues
Resolves the TODO in
src/core/wifi/wifi_common.h:"rn it skips open networks due to password == "" check".
User-Facing Change
Further Comments
Minimal, non-breaking change; no unrelated refactors. The helper is const and
adds no per-connection allocation, so the ESP32 memory impact is negligible.