mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-13 02:22:55 +03:00
BREAKING: Add Wrong Password wifi status case (#7652)
* Add Wrong Password wifi status case * Add wrong password case for status return * Add wrong password case for debug * Add Wrong password case to interactive example * Add case for wrong password to station doc * Add case for wrong password to resumeFromShutdown * Add wrong password case to wifi readme * Update ESP8266WiFiGeneric.cpp
This commit is contained in:
@ -827,15 +827,21 @@ bool ESP8266WiFiGenericClass::resumeFromShutdown (WiFiState* state)
|
||||
}
|
||||
}
|
||||
// state->state.fwconfig.bssid is not real bssid (it's what user may have provided when bssid_set==1)
|
||||
if (WiFi.begin((const char*)state->state.fwconfig.ssid,
|
||||
auto beginResult = WiFi.begin((const char*)state->state.fwconfig.ssid,
|
||||
(const char*)state->state.fwconfig.password,
|
||||
state->state.channel,
|
||||
nullptr/*(const uint8_t*)state->state.fwconfig.bssid*/, // <- try with gw's mac address?
|
||||
true) == WL_CONNECT_FAILED)
|
||||
true);
|
||||
if (beginResult == WL_CONNECT_FAILED)
|
||||
{
|
||||
DEBUG_WIFI("core: resume: WiFi.begin failed\n");
|
||||
return false;
|
||||
}
|
||||
if (beginResult == WL_WRONG_PASSWORD)
|
||||
{
|
||||
DEBUG_WIFI("core: resume: WiFi.begin wrong password\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (state->state.mode & WIFI_AP)
|
||||
|
Reference in New Issue
Block a user