There seems to be the race between the event RW_EVT_STA_CONNECTED and an actual valid SSID value returned by BDK. If even a small delay is injected immediately after the event reception the valid value becomes available. Without this fix, due to a polling nature of ESPHome WiFiComponent::check_connecting_finished function may observe the WiFiSTAConnectStatus::CONNECTED status but with an empty SSID value, leading to Incomplete connection. warning and immediate attempt to start another connection, while the current one was actually established.
There seems to be the race between the event
RW_EVT_STA_CONNECTED
and an actual valid SSID value returned by BDK. If even a small delay is injected immediately after the event reception the valid value becomes available. Without this fix, due to a polling nature ofESPHome WiFiComponent::check_connecting_finished
function may observe theWiFiSTAConnectStatus::CONNECTED
status but with an empty SSID value, leading toIncomplete connection.
warning and immediate attempt to start another connection, while the current one was actually established.