Skip to content

Commit 65d5e98

Browse files
committed
Fix inability to connect to 2nd and 3rd configured Wi-Fi AP.
espressif/arduino-esp32#11742
1 parent 8953e08 commit 65d5e98

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ats-mini/Network.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ static bool wifiInitAP()
243243
static bool wifiConnect()
244244
{
245245
String status = "Connecting to WiFi network..";
246+
wifi_mode_t mode = WiFi.getMode();
246247

247248
// Get the preferences
248249
prefs.begin("network", true, STORAGE_PARTITION);
@@ -261,6 +262,10 @@ static bool wifiConnect()
261262

262263
if(ssid != "")
263264
{
265+
// Workaround for https://github.com/espressif/arduino-esp32/issues/11742
266+
WiFi.mode(WIFI_MODE_NULL);
267+
WiFi.mode(mode);
268+
264269
WiFi.begin(ssid, password);
265270
for(int j=0 ; (WiFi.status()!=WL_CONNECTED) && (j<24) ; j++)
266271
{

changelog/244.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix Wi-Fi connection issue to 2nd or 3rd access point configured on the settings web page.

0 commit comments

Comments
 (0)