From 8a48536c63b560128472f31dd42e6dba92c95dc3 Mon Sep 17 00:00:00 2001 From: Prathyusha N Date: Fri, 6 Dec 2019 09:38:39 +0530 Subject: [PATCH] mesh: Start link establishment timer of 60 sec 5.3.2 of Mesh Profile Bluetooth specification: To open a link, the provisioner shall start the link establishment timer, set to 60 seconds, and then shall start sending Link Open messages. On timeout, close indication will be sent. Provisioner cancels the Link Establishment timer, when the link is open i.e. in pb_adv_tx(). Change-Id: I7e39904ef6eb85e18f6675a3de8d02a818d16146 Signed-off-by: Abhay Agarwal --- mesh/pb-adv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesh/pb-adv.c b/mesh/pb-adv.c index 27cbc46..c9a2a65 100644 --- a/mesh/pb-adv.c +++ b/mesh/pb-adv.c @@ -458,6 +458,8 @@ bool pb_adv_reg(bool initiator, mesh_prov_open_func_t open_cb, if (initiator) { l_getrandom(&pb_session->link_id, sizeof(pb_session->link_id)); + pb_session->tx_timeout = l_timeout_create(60, tx_timeout, + pb_session, NULL); send_open_req(pb_session); } -- 2.7.4