mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feat/ble_mesh_make_unprov_beacon_interval_configurable_v4.0' into 'release/v4.0'
Feat/ble mesh make unprov beacon interval configurable (v4.0) See merge request espressif/esp-idf!14064
This commit is contained in:
commit
c128769170
@ -248,6 +248,19 @@ if BLE_MESH
|
||||
advertising bearer. This option should be enabled if PB-ADV is
|
||||
going to be used during provisioning procedure.
|
||||
|
||||
config BLE_MESH_UNPROVISIONED_BEACON_INTERVAL
|
||||
int "Interval between two consecutive Unprovisioned Device Beacon"
|
||||
depends on BLE_MESH_NODE && BLE_MESH_PB_ADV
|
||||
default 5
|
||||
default 3 if BLE_MESH_FAST_PROV
|
||||
range 1 100
|
||||
help
|
||||
This option specifies the interval of sending two consecutive unprovisioned
|
||||
device beacon, users can use this option to change the frequency of sending
|
||||
unprovisioned device beacon. For example, if the value is 5, it means the
|
||||
unprovisioned device beacon will send every 5 seconds. When the option of
|
||||
BLE_MESH_FAST_PROV is selected, the value is better to be 3 seconds, or less.
|
||||
|
||||
config BLE_MESH_PB_GATT
|
||||
bool "Provisioning support using GATT (PB-GATT)"
|
||||
select BLE_MESH_PROXY
|
||||
|
@ -22,11 +22,11 @@
|
||||
#include "provisioner_prov.h"
|
||||
#include "provisioner_main.h"
|
||||
|
||||
#if defined(CONFIG_BLE_MESH_FAST_PROV)
|
||||
#define UNPROVISIONED_INTERVAL K_SECONDS(3)
|
||||
#if defined(CONFIG_BLE_MESH_UNPROVISIONED_BEACON_INTERVAL)
|
||||
#define UNPROVISIONED_INTERVAL K_SECONDS(CONFIG_BLE_MESH_UNPROVISIONED_BEACON_INTERVAL)
|
||||
#else
|
||||
#define UNPROVISIONED_INTERVAL K_SECONDS(5)
|
||||
#endif /* CONFIG_BLE_MESH_FAST_PROV */
|
||||
#endif
|
||||
#define PROVISIONED_INTERVAL K_SECONDS(10)
|
||||
|
||||
#define BEACON_TYPE_UNPROVISIONED 0x00
|
||||
|
@ -2352,7 +2352,7 @@ send_status:
|
||||
|
||||
if (status == STATUS_SUCCESS) {
|
||||
bt_mesh_cfg_server_state_change_t change = {0};
|
||||
change.cfg_netkey_delete.net_idx = sub->net_idx;
|
||||
change.cfg_netkey_delete.net_idx = sub ? sub->net_idx : BLE_MESH_KEY_UNUSED;
|
||||
bt_mesh_config_server_cb_evt_to_btc(BTC_BLE_MESH_EVT_CONFIG_SERVER_STATE_CHANGE,
|
||||
model, ctx, (const uint8_t *)&change, sizeof(change));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user