Skip to content

Commit

Permalink
Adjust the default discovery timeout when BLE extend announcement is …
Browse files Browse the repository at this point in the history
…enabled. (project-chip#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
  • Loading branch information
jmartinez-silabs authored Feb 26, 2024
1 parent 8f2a4d2 commit 6a0a056
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/include/platform/CHIPDeviceConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,19 @@ static_assert(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN <= CHIP_DEVICE
* Time in seconds that a factory new device will advertise commissionable node discovery.
*/
#ifndef CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS
#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING
/**
* By default, the extended announcement, when enabled, starts its extended advertising 15 mins
* after the standard slow advertisement. Time at which the default discovery time would close the
* commissioning window and stop the BLE.
* Therefore, when CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING is enabled bump the default Discovery timeout
* to the maximum allowed by the spec. 48h.
*/
#define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (60 * 60 * 48)
#else
#define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (15 * 60)
#endif
#endif // CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING
#endif // CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS

/**
* CHIP_DEVICE_CONFIG_MAX_DISCOVERED_NODES
Expand Down
2 changes: 2 additions & 0 deletions src/platform/silabs/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@

#define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 25

#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING SL_MATTER_BLE_EXTENDED_ADV

/*
ICD Configuration Defines
*/
Expand Down
4 changes: 4 additions & 0 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ declare_args() {
# Enable Segger System View
use_system_view = false

# Enable the BLE extended advertisement
sl_matter_ble_extended_adv = false

# ICD Openthread Configuration flags
sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals
sl_ot_active_interval_ms = 200 # 200ms Active Intervals
Expand Down Expand Up @@ -297,6 +300,7 @@ template("efr32_sdk") {
"SL_RAIL_LIB_MULTIPROTOCOL_SUPPORT=1",
"SL_RAIL_UTIL_PA_CONFIG_HEADER=<sl_rail_util_pa_config.h>",
"RADIO_CONFIG_DMP_SUPPORT=1",
"SL_MATTER_BLE_EXTENDED_ADV=${sl_matter_ble_extended_adv}",

#"__STACK_SIZE=0",
]
Expand Down

0 comments on commit 6a0a056

Please sign in to comment.