From 7fccbcf78da13e43aacc9f840f3f78538e5098b0 Mon Sep 17 00:00:00 2001 From: Luo Xu Date: Fri, 15 Nov 2024 17:23:25 +0800 Subject: [PATCH] fix(ble_mesh): fixed heartbeat issue (cherry picked from commit 167cd4762b79a09e891569a923c256c72335ad94) Co-authored-by: luoxu --- components/bt/esp_ble_mesh/mesh_core/settings.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/bt/esp_ble_mesh/mesh_core/settings.c b/components/bt/esp_ble_mesh/mesh_core/settings.c index b93241a7726f..f5b661b2a1c1 100644 --- a/components/bt/esp_ble_mesh/mesh_core/settings.c +++ b/components/bt/esp_ble_mesh/mesh_core/settings.c @@ -1422,6 +1422,8 @@ int settings_core_commit(void) struct bt_mesh_hb_pub *hb_pub = NULL; struct bt_mesh_cfg_srv *cfg = NULL; + bt_mesh_atomic_set_bit(bt_mesh.flags, BLE_MESH_VALID); + hb_pub = bt_mesh_hb_pub_get(); if (hb_pub && hb_pub->dst != BLE_MESH_ADDR_UNASSIGNED && hb_pub->count && hb_pub->period) { @@ -1440,7 +1442,6 @@ int settings_core_commit(void) cfg->default_ttl = stored_cfg.cfg.default_ttl; } - bt_mesh_atomic_set_bit(bt_mesh.flags, BLE_MESH_VALID); bt_mesh_net_start(); } #endif /* CONFIG_BLE_MESH_NODE */