fix(wifi): persist password alongside SSID after SDK/WiFiManager connect (v1.9.10)
After a successful connect via SDK-cached credentials (Try 1) or the
WiFiManager captive portal, only the SSID was saved to EEPROM. On the next
boot config.password was empty, so setupWiFi() and the reconnect loop called
WiFi.begin(ssid) as if the network were open and failed with
WL_WRONG_PASSWORD.
v1.9.6 masked this: with an empty password the retry loop fell back to a
bare WiFi.begin(), which reuses the SDK-stored credentials. Commit 02834ba
(v1.9.7) replaced that fallback with WiFi.begin(config.ssid), and v1.9.9
(M2) added the same call to setupWiFi(), so every version after 1.9.6
never reconnects after a reboot when the device was set up through the
portal.
Read the password back with WiFi.psk() and store it next to the SSID in
all three places that sync the SSID. Devices already in this state recover
by entering the password once in the web UI (fallback AP after ~2.5 min).
Verified: builds with PlatformIO (espressif8266 core 3.1.2, esp01_1m).
Fixes #12
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
75b6a21f3c
commit
aee1d3e0ef
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.9.10] - 2026-09-20
|
||||
|
||||
### Fixed
|
||||
|
||||
- **WiFi password lost after captive-portal setup, no reconnect after reboot** (#12):
|
||||
after a successful connect via SDK-cached credentials (Try 1) or the WiFiManager
|
||||
portal, only the SSID was written to EEPROM. On the next boot `config.password`
|
||||
was empty, so `setupWiFi()` and the reconnect loop called `WiFi.begin(ssid)` as
|
||||
if the network were open and failed with `WL_WRONG_PASSWORD`. v1.9.6 masked this
|
||||
through the bare `WiFi.begin()` fallback in the retry loop, which 02834ba (v1.9.7)
|
||||
replaced with `WiFi.begin(config.ssid)`. Now the password is read back with
|
||||
`WiFi.psk()` and saved next to the SSID in all three places that sync the SSID.
|
||||
Devices already stuck recover by entering the password once in the web UI.
|
||||
|
||||
## [1.9.9] - 2026-05-19
|
||||
|
||||
### Fixed
|
||||
|
||||
Reference in New Issue
Block a user