Skip to content

Commit

Permalink
ESP32: check ap info in IsStationConnected (project-chip#31438)
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 authored and Jerry-ESP committed Apr 25, 2024
1 parent c438217 commit 162a779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/ESP32/ESP32Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool ESP32Utils::IsStationProvisioned(void)
CHIP_ERROR ESP32Utils::IsStationConnected(bool & connected)
{
wifi_ap_record_t apInfo;
connected = (esp_wifi_sta_get_ap_info(&apInfo) == ESP_OK);
connected = (esp_wifi_sta_get_ap_info(&apInfo) == ESP_OK && apInfo.ssid[0] != 0);
return CHIP_NO_ERROR;
}

Expand Down

0 comments on commit 162a779

Please sign in to comment.