Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32: add more ICD kconfig options #29371

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -310,24 +310,56 @@ 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)"
andy31415 marked this conversation as resolved.
Show resolved Hide resolved
depends on ENABLE_ICD_SERVER
default 5000
help
The value defines the fastest frequency at which the device will typically receive
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
Fast Polling defines the fastest frequency at which the device can receive messages
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
Expand Down
1 change: 1 addition & 0 deletions config/esp32/components/chip/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ dependencies:
# Issue: https://github.com/project-chip/connectedhomeip/issues/29125
rules:
- if: "idf_version >=5.0"
- if: "target != esp32h2"
4 changes: 2 additions & 2 deletions src/platform/ESP32/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions src/platform/ESP32/CHIPPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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