Skip to content

Commit

Permalink
Prevent WiFi config corruption (#1997 #1856 #1699 #1675)
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed May 10, 2016
1 parent 61cc420 commit f2fb43c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
ETS_UART_INTR_DISABLE();

if(WiFi._persistent) {
// workaround for #1997: make sure the value of ap_number is updated and written to flash
// to be removed after SDK update
wifi_station_ap_number_set(2);
wifi_station_ap_number_set(1);

wifi_station_set_config(&conf);
} else {
wifi_station_set_config_current(&conf);
Expand Down

0 comments on commit f2fb43c

Please sign in to comment.