Skip to content

Commit 1349baf

Browse files
igrrdevyte
authored andcommitted
[WIP] ESP8266WiFi: initialize new fields, remove old workaround (#4413)
* ESP8266WiFi: initialise new STA configuration fields * ESP8266WiFi: remove workaround for wifi_station_ap_number
1 parent 19eb6ea commit 1349baf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
126126
*conf.password = 0;
127127
}
128128

129+
conf.threshold.rssi = -127;
130+
131+
// TODO(#909): set authmode to AUTH_WPA_PSK if passphrase is provided
132+
conf.threshold.authmode = AUTH_OPEN;
133+
129134
if(bssid) {
130135
conf.bssid_set = 1;
131136
memcpy((void *) &conf.bssid[0], (void *) bssid, 6);
@@ -142,11 +147,6 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
142147
ETS_UART_INTR_DISABLE();
143148

144149
if(WiFi._persistent) {
145-
// workaround for #1997: make sure the value of ap_number is updated and written to flash
146-
// to be removed after SDK update
147-
wifi_station_ap_number_set(2);
148-
wifi_station_ap_number_set(1);
149-
150150
wifi_station_set_config(&conf);
151151
} else {
152152
wifi_station_set_config_current(&conf);

0 commit comments

Comments
 (0)