From 52173539487d5cd9c3e2f3842c861f95a5d8c8e0 Mon Sep 17 00:00:00 2001 From: Martin Girardot <165289184+Martin-NXP@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:29:08 +0200 Subject: [PATCH] [NXP] Add ICD _SetPollingInterval and set minimum ActiveModeThreshold to 5 seconds (#33875) * [NXP][common] The minimum ActiveModeThreshold value for a LIT ICD is 5 seconds During initialization, the app would stuck in an assert if the app was configured as a LIT ICD: VerifyOrDieWithMsg(ICDConfigurationData::GetInstance().GetMinLitActiveModeThreshold() <= ICDConfigurationData::GetInstance().GetActiveModeThreshold(), AppServer, "The minimum ActiveModeThreshold value for a LIT ICD is 5 seconds."); Setting the default value of nxp_active_mode_threshold_ms to 5000ms fixes the issue. Signed-off-by: marius-alex-tache * [NXP][platform][common] Add the _SetPollingInterval for Wi-Fi SIT ICDM function Signed-off-by: Chin-Ran Lo --------- Signed-off-by: marius-alex-tache Signed-off-by: Chin-Ran Lo Co-authored-by: marius-alex-tache Co-authored-by: Chin-Ran Lo --- src/platform/nxp/common/ConnectivityManagerImpl.cpp | 10 ++++++++++ src/platform/nxp/common/ConnectivityManagerImpl.h | 3 +++ third_party/nxp/nxp_sdk.gni | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.cpp b/src/platform/nxp/common/ConnectivityManagerImpl.cpp index c9d2861686b143..79abd4e9648dca 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/common/ConnectivityManagerImpl.cpp @@ -618,6 +618,16 @@ CHIP_ERROR ConnectivityManagerImpl::_DisconnectNetwork(void) return err; } + +#if CHIP_CONFIG_ENABLE_ICD_SERVER +CHIP_ERROR ConnectivityManagerImpl::_SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) +{ + /* + * ToDo: Call API to put device into sleep + */ + return CHIP_NO_ERROR; +} +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER #endif } // namespace DeviceLayer diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.h b/src/platform/nxp/common/ConnectivityManagerImpl.h index 49e4f66a13197b..82ce24f814d544 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.h +++ b/src/platform/nxp/common/ConnectivityManagerImpl.h @@ -87,6 +87,9 @@ class ConnectivityManagerImpl final : public ConnectivityManager, #if CHIP_DEVICE_CONFIG_ENABLE_WPA void StartWiFiManagement(); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + CHIP_ERROR _SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER #if CHIP_ENABLE_OPENTHREAD Inet::InterfaceId GetExternalInterface(); Inet::InterfaceId GetThreadInterface(); diff --git a/third_party/nxp/nxp_sdk.gni b/third_party/nxp/nxp_sdk.gni index da66a0d51c5721..cb27d5c7554c84 100644 --- a/third_party/nxp/nxp_sdk.gni +++ b/third_party/nxp/nxp_sdk.gni @@ -53,7 +53,7 @@ declare_args() { nxp_idle_mode_duration_s = 600 # 10min Idle Mode Interval nxp_active_mode_duration_ms = 10000 # 10s Active Mode Interval - nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold + nxp_active_mode_threshold_ms = 5000 # 5s Active Mode Threshold nxp_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric }