J. Nick Koston bad6a62226 [wifi] Fix RP2040 falsely reporting WiFi connected after AP fallback
Two bugs combined to make the RP2040 Pico W immediately think it was
connected to WiFi after starting the fallback AP, causing it to disable
the AP and stop retrying:

1. wifi_mode_(false, {}) was a no-op for STA disable — restart_adapter()
   calls this to tear down STA, but the implementation only handled
   sta=true. The CYW43 STA link state remained CYW43_LINK_JOIN from
   the timed-out connection attempt.

2. wifi_ap_ip_config_() called WiFi.config(192.168.4.1) which configured
   the STA interface's IP (not the AP's). When wifi_sta_connect_status_()
   checked WiFi.status(), CYW43lwIP::status() saw CYW43_LINK_JOIN +
   localIP().isSet() and returned WL_CONNECTED.

Fix wifi_mode_() to call WiFi.disconnect() when sta=false to clear stale
link state. Remove the WiFi.config() call from wifi_ap_ip_config_() since
WiFi.beginAP() already configures the AP IP internally. Also fix
wifi_soft_ap_ip() to use WiFi.softAPIP() instead of WiFi.localIP().
2026-03-04 23:39:58 -10:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2025-12-21 09:26:03 -05:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2026-03-03 10:55:56 -10:00
2025-12-08 14:37:45 -05:00
2026-03-03 20:45:28 +13:00
2025-07-17 22:40:28 +12:00
2026-02-11 22:11:48 -05:00
2025-12-05 08:48:04 -05:00
S
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme Multiple Licenses
597 MiB
Languages
C++ 55.8%
Python 43.6%
C 0.3%
JavaScript 0.2%