From 0f87363e3ece0ecbe2a421a25d5d3d303a270237 Mon Sep 17 00:00:00 2001 From: luoxu Date: Wed, 21 Dec 2022 14:43:58 +0800 Subject: [PATCH] ble_mesh: stack: for the case MESH/PVNR/PBADV/BV-01, add the close link reason before reset link --- components/bt/esp_ble_mesh/mesh_core/provisioner_prov.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/bt/esp_ble_mesh/mesh_core/provisioner_prov.c b/components/bt/esp_ble_mesh/mesh_core/provisioner_prov.c index 9f039132d0..8ff6ce83ce 100644 --- a/components/bt/esp_ble_mesh/mesh_core/provisioner_prov.c +++ b/components/bt/esp_ble_mesh/mesh_core/provisioner_prov.c @@ -2725,6 +2725,11 @@ static void prov_retransmit(struct k_work *work) #endif if (k_uptime_get() - link[idx].tx.start > timeout) { BT_WARN("Provisioner timeout, giving up transaction"); + /** + * For the case MESH/PVNR/PBADV/BV-01, provisoner should + * sends link close with reason. + */ + close_link(idx,CLOSE_REASON_TIMEOUT); reset_link(idx, CLOSE_REASON_TIMEOUT); return; }