Skip to content

Commit 6a0a056

Browse files
Adjust the default discovery timeout when BLE extend announcement is enabled. (#32300)
* add build arg to enable BLE extended advertisement feature * Set a increased based value for the Discovery timeout when BLE extended advertising is set
1 parent 8f2a4d2 commit 6a0a056

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

src/include/platform/CHIPDeviceConfig.h

+12-1
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,19 @@ static_assert(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN <= CHIP_DEVICE
713713
* Time in seconds that a factory new device will advertise commissionable node discovery.
714714
*/
715715
#ifndef CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS
716+
#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING
717+
/**
718+
* By default, the extended announcement, when enabled, starts its extended advertising 15 mins
719+
* after the standard slow advertisement. Time at which the default discovery time would close the
720+
* commissioning window and stop the BLE.
721+
* Therefore, when CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING is enabled bump the default Discovery timeout
722+
* to the maximum allowed by the spec. 48h.
723+
*/
724+
#define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (60 * 60 * 48)
725+
#else
716726
#define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (15 * 60)
717-
#endif
727+
#endif // CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING
728+
#endif // CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS
718729

719730
/**
720731
* CHIP_DEVICE_CONFIG_MAX_DISCOVERED_NODES

src/platform/silabs/CHIPDevicePlatformConfig.h

+2
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@
140140

141141
#define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 25
142142

143+
#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING SL_MATTER_BLE_EXTENDED_ADV
144+
143145
/*
144146
ICD Configuration Defines
145147
*/

third_party/silabs/efr32_sdk.gni

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ declare_args() {
4646
# Enable Segger System View
4747
use_system_view = false
4848

49+
# Enable the BLE extended advertisement
50+
sl_matter_ble_extended_adv = false
51+
4952
# ICD Openthread Configuration flags
5053
sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals
5154
sl_ot_active_interval_ms = 200 # 200ms Active Intervals
@@ -297,6 +300,7 @@ template("efr32_sdk") {
297300
"SL_RAIL_LIB_MULTIPROTOCOL_SUPPORT=1",
298301
"SL_RAIL_UTIL_PA_CONFIG_HEADER=<sl_rail_util_pa_config.h>",
299302
"RADIO_CONFIG_DMP_SUPPORT=1",
303+
"SL_MATTER_BLE_EXTENDED_ADV=${sl_matter_ble_extended_adv}",
300304

301305
#"__STACK_SIZE=0",
302306
]

0 commit comments

Comments
 (0)