Skip to content

Commit

Permalink
Fix MRP SessionIdleInterval per spec to 500ms
Browse files Browse the repository at this point in the history
Spec has the default SESSION_IDLE_INTERVAL defined as 500ms
https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/1.2/src/secure_channel/Message_Reliability_MRP.adoc#8-parameters-and-constants

Originally defined as 300ms, this change was introduced as part of spec PR
CHIP-Specifications/connectedhomeip-spec#7186
  • Loading branch information
samadDotDev committed Feb 14, 2024
1 parent 598356c commit faffa65
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_SC_4_10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tests:
verification: |
avahi-browse -rt _matter._tcp
On the TH(Chip-tool) Log: Verify the DUT is advertising for:
-SII key is higher than the SLEEPY_IDLE_INTERVAL default value (> 300 milliseconds)
- SII key is higher than the SLEEPY_IDLE_INTERVAL default value (> 500 milliseconds)
- SII key and SAI key is less than 3600000 (1hour in milliseconds)
+ eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local
Expand Down
4 changes: 2 additions & 2 deletions src/messaging/ReliableMessageProtocolConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ void ClearLocalMRPConfigOverride()

ReliableMessageProtocolConfig GetDefaultMRPConfig()
{
// Default MRP intervals are defined in spec <2.11.3. Parameters and Constants>
static constexpr const System::Clock::Milliseconds32 idleRetransTimeout = 300_ms32;
// Default MRP intervals are defined in spec <4.12.8. Parameters and Constants>
static constexpr const System::Clock::Milliseconds32 idleRetransTimeout = 500_ms32;
static constexpr const System::Clock::Milliseconds32 activeRetransTimeout = 300_ms32;
static constexpr const System::Clock::Milliseconds16 activeThresholdTime = 4000_ms16;
return ReliableMessageProtocolConfig(idleRetransTimeout, activeRetransTimeout, activeThresholdTime);
Expand Down
2 changes: 1 addition & 1 deletion src/messaging/ReliableMessageProtocolConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace chip {
#if CHIP_ENABLE_OPENTHREAD && !CHIP_DEVICE_LAYER_TARGET_LINUX
#define CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL (800_ms32)
#else
#define CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL (300_ms32)
#define CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL (500_ms32)
#endif
#endif // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL && !CHIP_DEVICE_LAYER_TARGET_LINUX

Expand Down
2 changes: 1 addition & 1 deletion src/messaging/tests/MessagingContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class MessagingContext : public PlatformMemoryUser
enum MRPMode
{
kDefault = 1, // This adopts the default MRP values for idle/active as per the spec.
// i.e IDLE = 4s, ACTIVE = 300ms
// i.e IDLE = 500ms, ACTIVE = 300ms

kResponsive = 2, // This adopts values that are better suited for loopback tests that
// don't actually go over a network interface, and are tuned much lower
Expand Down

0 comments on commit faffa65

Please sign in to comment.