Skip to content

Commit 403852d

Browse files
authored
ESP32: Add custom MRP configs for the esp platform (#33354)
1 parent 651298b commit 403852d

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

config/esp32/components/chip/Kconfig

+58
Original file line numberDiff line numberDiff line change
@@ -967,4 +967,62 @@ menu "CHIP Device Layer"
967967

968968
endmenu
969969

970+
menu "Message Reliable Protocol Options"
971+
config MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_THREAD
972+
int "MRP local active retry interval for Thread network in milliseconds"
973+
depends on OPENTHREAD_ENABLED
974+
range 0 3600000
975+
default 800
976+
help
977+
Base retry interval of the present Thread node when it is in the active state.
978+
979+
config MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_WIFI_ETHERNET
980+
int "MRP local active retry interval for WIFI or ETHERNET network in milliseconds"
981+
depends on !OPENTHREAD_ENABLED
982+
range 0 3600000
983+
default 300
984+
help
985+
Base retry interval of the present node (WIFI or ETHERNET) when it is in the active state.
986+
987+
config MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_THREAD
988+
int "MRP local idle retry interval for Thread network in milliseconds"
989+
depends on OPENTHREAD_ENABLED
990+
range 0 3600000
991+
default 800
992+
help
993+
Base retry interval of the present Thread node when it is in the idle state.
994+
995+
config MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_WIFI_ETHERNET
996+
int "MRP local idle retry interval for WIFI or ETHERNET network in milliseconds"
997+
depends on !OPENTHREAD_ENABLED
998+
range 0 3600000
999+
default 500
1000+
help
1001+
Base retry interval of the present node (WIFI or ETHERNET) when it is in the idle state.
1002+
1003+
config MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_THREAD
1004+
int "MRP retransmission delta timeout for Thread network in milliseconds"
1005+
depends on OPENTHREAD_ENABLED
1006+
range 0 3600000
1007+
default 500
1008+
help
1009+
A constant value added to the calculated retransmission timeout.
1010+
1011+
config MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_WIFI_ETHERNET
1012+
int "MRP retransmission delta timeout for WIFI or ETHERNET network in milliseconds"
1013+
depends on !OPENTHREAD_ENABLED
1014+
range 0 3600000
1015+
default 0
1016+
help
1017+
A constant value added to the calculated retransmission timeout.
1018+
1019+
config MRP_MAX_RETRANS
1020+
int "MRP retransmission maximum count"
1021+
range 1 10
1022+
default 4
1023+
help
1024+
The maximum number of retransmissions before giving up.
1025+
1026+
endmenu
1027+
9701028
endmenu

src/platform/ESP32/CHIPPlatformConfig.h

+34
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,37 @@
7575
#else
7676
#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0
7777
#endif
78+
79+
#ifndef CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL
80+
#if CHIP_ENABLE_OPENTHREAD
81+
#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL \
82+
chip::System::Clock::Milliseconds32(CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_THREAD)
83+
#else
84+
#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL \
85+
chip::System::Clock::Milliseconds32(CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_WIFI_ETHERNET)
86+
#endif // CHIP_ENABLE_OPENTHREAD
87+
#endif // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL
88+
89+
#ifndef CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL
90+
#if CHIP_ENABLE_OPENTHREAD
91+
#define CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL \
92+
chip::System::Clock::Milliseconds32(CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_THREAD)
93+
#else
94+
#define CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL \
95+
chip::System::Clock::Milliseconds32(CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_WIFI_ETHERNET)
96+
#endif // CHIP_ENABLE_OPENTHREAD
97+
#endif // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL
98+
99+
#ifndef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST
100+
#if CHIP_ENABLE_OPENTHREAD
101+
#define CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST \
102+
chip::System::Clock::Milliseconds32(CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_THREAD)
103+
#else
104+
#define CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST \
105+
chip::System::Clock::Milliseconds32(CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_WIFI_ETHERNET)
106+
#endif // CHIP_ENABLE_OPENTHREAD
107+
#endif // CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST
108+
109+
#ifndef CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS
110+
#define CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS CONFIG_MRP_MAX_RETRANS
111+
#endif // CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS

0 commit comments

Comments
 (0)