From 4ac8a824386328ac5f7b98b91168639d44131513 Mon Sep 17 00:00:00 2001 From: Lingao Meng Date: Thu, 28 Oct 2021 16:04:39 +0800 Subject: [PATCH] Bluetooth: Mesh: Fix missing enable adv thread When user only use pb-gatt provisioning, which unable to send out connectable advertising, due to adv thread not started. Signed-off-by: Lingao Meng --- subsys/bluetooth/mesh/pb_gatt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/subsys/bluetooth/mesh/pb_gatt.c b/subsys/bluetooth/mesh/pb_gatt.c index 992eebe878544..dc5bed9b315f3 100644 --- a/subsys/bluetooth/mesh/pb_gatt.c +++ b/subsys/bluetooth/mesh/pb_gatt.c @@ -119,6 +119,14 @@ int bt_mesh_pb_gatt_close(struct bt_conn *conn) static int link_accept(const struct prov_bearer_cb *cb, void *cb_data) { + int err; + + err = bt_mesh_adv_enable(); + if (err) { + BT_ERR("Failed enabling advertiser"); + return err; + } + (void)bt_mesh_proxy_prov_enable(); bt_mesh_adv_update();