mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 08:15:49 +00:00
not needed
This commit is contained in:
@@ -815,10 +815,13 @@ void WiFiComponent::retry_connect() {
|
|||||||
this->selected_sta_index_ = 0; // Retry from the first configured AP
|
this->selected_sta_index_ = 0; // Retry from the first configured AP
|
||||||
this->reset_for_next_ap_attempt_();
|
this->reset_for_next_ap_attempt_();
|
||||||
} else if (this->selected_sta_index_ >= static_cast<int8_t>(this->sta_.size()) - 1) {
|
} else if (this->selected_sta_index_ >= static_cast<int8_t>(this->sta_.size()) - 1) {
|
||||||
// Exhausted all configured APs, cycle back to first
|
// Exhausted all configured APs, restart adapter and cycle back to first
|
||||||
|
// Restart clears any stuck WiFi driver state
|
||||||
// Each AP is tried with SSID only (no BSSID/channel) which triggers ESP-IDF internal scanning
|
// Each AP is tried with SSID only (no BSSID/channel) which triggers ESP-IDF internal scanning
|
||||||
|
ESP_LOGW(TAG, "No more APs to try");
|
||||||
this->selected_sta_index_ = 0;
|
this->selected_sta_index_ = 0;
|
||||||
this->reset_for_next_ap_attempt_();
|
this->reset_for_next_ap_attempt_();
|
||||||
|
this->restart_adapter();
|
||||||
} else {
|
} else {
|
||||||
// Try next AP
|
// Try next AP
|
||||||
this->selected_sta_index_++;
|
this->selected_sta_index_++;
|
||||||
|
|||||||
Reference in New Issue
Block a user