Skip to content

Commit f2fb43c

Browse files
committedMay 10, 2016
Prevent WiFi config corruption (#1997 #1856 #1699 #1675)
1 parent 61cc420 commit f2fb43c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
140140
ETS_UART_INTR_DISABLE();
141141

142142
if(WiFi._persistent) {
143+
// workaround for #1997: make sure the value of ap_number is updated and written to flash
144+
// to be removed after SDK update
145+
wifi_station_ap_number_set(2);
146+
wifi_station_ap_number_set(1);
147+
143148
wifi_station_set_config(&conf);
144149
} else {
145150
wifi_station_set_config_current(&conf);

0 commit comments

Comments
 (0)