Skip to content

Commit 67cbbed

Browse files
committed
[nrf toup] [nrfconnect] Added log for the WiFi connection failure
This might help when debugging the WiFi connection failures. Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
1 parent b6d6e9a commit 67cbbed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/platform/nrfconnect/wifi/WiFiManager.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ NetworkCommissioning::WiFiScanResponse ToScanResponse(const wifi_scan_result * r
7676
// TODO: Distinguish WPA versions
7777
response.security.Set(result->security == WIFI_SECURITY_TYPE_PSK ? NetworkCommissioning::WiFiSecurity::kWpaPersonal
7878
: NetworkCommissioning::WiFiSecurity::kUnencrypted);
79-
response.channel = result->channel;
80-
response.rssi = result->rssi;
81-
response.ssidLen = result->ssid_length;
79+
response.channel = result->channel;
80+
response.rssi = result->rssi;
81+
response.ssidLen = result->ssid_length;
8282
response.wiFiBand = ConvertBandEnum(result->band);
8383
memcpy(response.ssid, result->ssid, result->ssid_length);
8484
// TODO: MAC/BSSID is not filled by the Wi-Fi driver
@@ -500,6 +500,8 @@ void WiFiManager::ConnectHandler(Platform::UniquePtr<uint8_t> data, size_t lengt
500500
}
501501

502502
delegate->OnAssociationFailureDetected(associationFailureCause, reason);
503+
504+
ChipLogError(DeviceLayer, "WiFi connection failure. Cause: %d, reason: %d", associationFailureCause, reason);
503505
}
504506
}
505507
else // The connection has been established successfully.

0 commit comments

Comments
 (0)