Switch to all channel scan when connecting to AP in STA mode

Default was fast scan.
This commit is contained in:
Sandeep Mistry
2018-09-21 14:50:20 -04:00
committed by Sandeep Mistry
parent dd8c18dcc1
commit 6c116be242

View File

@@ -171,6 +171,7 @@ uint8_t WiFiClass::begin(const char* ssid, const char* key)
memset(&wifiConfig, 0x00, sizeof(wifiConfig));
strncpy((char*)wifiConfig.sta.ssid, ssid, sizeof(wifiConfig.sta.ssid));
strncpy((char*)wifiConfig.sta.password, key, sizeof(wifiConfig.sta.password));
wifiConfig.sta.scan_method = WIFI_ALL_CHANNEL_SCAN;
_status = WL_NO_SSID_AVAIL;
_interface = ESP_IF_WIFI_STA;