diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 3c099437ad9813..bbe36e77c001e5 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -310,8 +310,8 @@ menu "CHIP Device Layer" help Enables or Disables ICD server - config ICD_SLOW_POLL_INTERVAL - int "ICD Slow Polling Interval" + config ICD_SLOW_POLL_INTERVAL_MS + int "ICD Slow Polling Interval(ms)" depends on ENABLE_ICD_SERVER default 5000 help @@ -319,8 +319,8 @@ menu "CHIP Device Layer" messages in Idle Mode. The Slow Polling interval MAY be the same as the Idle Mode Interval. - config ICD_FAST_POLL_INTERVAL - int "ICD Fast Polling Interval" + config ICD_FAST_POLL_INTERVAL_MS + int "ICD Fast Polling Interval(ms)" depends on ENABLE_ICD_SERVER default 200 help @@ -328,6 +328,38 @@ menu "CHIP Device Layer" in Active Mode. The Fast Polling interval SHALL be smaller than the Active Mode Interval. + config ICD_IDLE_MODE_INTERVAL_SEC + int "ICD Idle Mode Interval(sec)" + depends on ENABLE_ICD_SERVER + default 2 + help + This value indicates the maximum interval in seconds the server can stay in idle + mode. + + config ICD_ACTIVE_MODE_INTERVAL_MS + int "ICD Active Mode Interval(ms)" + depends on ENABLE_ICD_SERVER + default 300 + help + This value indicates the minimum interval in milliseconds the server can stay in + active mode. + + config ICD_ACTIVE_MODE_THRESHOLD_MS + int "ICD Active Mode Threshold(ms)" + depends on ENABLE_ICD_SERVER + default 300 + help + This value indicates the minimum amount of time in milliseconds the server typically + will stay active after network activity when in active mode. + + config ICD_CLIENTS_SUPPORTED_PER_FABRIC + int "ICD Clients Number Supported Per Fabric" + depends on ENABLE_ICD_SERVER + default 1 + help + This value indicates the maximum number of entries that the ICD server is able to store + for each fabric in the RegisteredClients attribute. + config ENABLE_BG_EVENT_PROCESSING bool "Enable Background event processing" default n diff --git a/config/esp32/components/chip/idf_component.yml b/config/esp32/components/chip/idf_component.yml index 9b888d269c166e..f4b130c7402af5 100644 --- a/config/esp32/components/chip/idf_component.yml +++ b/config/esp32/components/chip/idf_component.yml @@ -24,3 +24,4 @@ dependencies: # Issue: https://github.com/project-chip/connectedhomeip/issues/29125 rules: - if: "idf_version >=5.0" + - if: "target != esp32h2" diff --git a/src/platform/ESP32/CHIPDevicePlatformConfig.h b/src/platform/ESP32/CHIPDevicePlatformConfig.h index f7d59b60197bde..ba583b64c8fa0b 100644 --- a/src/platform/ESP32/CHIPDevicePlatformConfig.h +++ b/src/platform/ESP32/CHIPDevicePlatformConfig.h @@ -74,8 +74,8 @@ #endif // CONFIG_IDF_TARGET_ESP32H2 #if CONFIG_ENABLE_ICD_SERVER -#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_ICD_SLOW_POLL_INTERVAL) -#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_ICD_FAST_POLL_INTERVAL) +#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_ICD_SLOW_POLL_INTERVAL_MS) +#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_ICD_FAST_POLL_INTERVAL_MS) #endif // CHIP_CONFIG_ENABLE_ICD_SERVER #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE CONFIG_ENABLE_CHIPOBLE diff --git a/src/platform/ESP32/CHIPPlatformConfig.h b/src/platform/ESP32/CHIPPlatformConfig.h index a01ead49544a20..26101757787d08 100644 --- a/src/platform/ESP32/CHIPPlatformConfig.h +++ b/src/platform/ESP32/CHIPPlatformConfig.h @@ -75,3 +75,23 @@ #else #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 #endif + +#if CONFIG_ENABLE_ICD_SERVER + +#ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL_SEC +#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL_SEC CONFIG_ICD_IDLE_MODE_INTERVAL_SEC +#endif // CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL_SEC + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL_MS +#define CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL_MS CONFIG_ICD_ACTIVE_MODE_INTERVAL_MS +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL_MS + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS +#define CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS + +#ifndef CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC +#define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC +#endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC + +#endif // CONFIG_ENABLE_ICD_SERVER