mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
Merge branch 'bugfix/fix_fast_interval_prov_adv_v5.0' into 'release/v5.0'
ble_mesh: stack: Fix send fast interval prov_adv failed (v5.0) See merge request espressif/esp-idf!20635
This commit is contained in:
commit
8a956957f6
@ -73,6 +73,7 @@ static uint16_t proxy_ccc_val;
|
|||||||
#if defined(CONFIG_BLE_MESH_PB_GATT)
|
#if defined(CONFIG_BLE_MESH_PB_GATT)
|
||||||
static uint16_t prov_ccc_val;
|
static uint16_t prov_ccc_val;
|
||||||
static bool prov_fast_adv;
|
static bool prov_fast_adv;
|
||||||
|
static uint32_t prov_start_time;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct bt_mesh_proxy_client {
|
static struct bt_mesh_proxy_client {
|
||||||
@ -1377,12 +1378,16 @@ int32_t bt_mesh_proxy_server_adv_start(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_BLE_MESH_PB_GATT)
|
#if defined(CONFIG_BLE_MESH_PB_GATT)
|
||||||
|
if (prov_fast_adv) {
|
||||||
|
prov_start_time = k_uptime_get_32();
|
||||||
|
}
|
||||||
|
|
||||||
if (!bt_mesh_is_provisioned()) {
|
if (!bt_mesh_is_provisioned()) {
|
||||||
const struct bt_mesh_adv_param *param;
|
const struct bt_mesh_adv_param *param;
|
||||||
struct bt_mesh_adv_data prov_sd[2];
|
struct bt_mesh_adv_data prov_sd[2];
|
||||||
size_t prov_sd_len;
|
size_t prov_sd_len;
|
||||||
|
|
||||||
if (prov_fast_adv) {
|
if (k_uptime_get_32() - prov_start_time < K_SECONDS(60)) {
|
||||||
param = &fast_adv_param;
|
param = &fast_adv_param;
|
||||||
} else {
|
} else {
|
||||||
param = &slow_adv_param;
|
param = &slow_adv_param;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user