Skip to content

Commit 3e14c13

Browse files
PavelVPVcarlescufi
authored andcommitted
Bluetooth: Mesh: Use default provisioning protocol timeout in RPR Client
The timeout used upon opening the link with the server relates to the PB-Remote Link Open procedure, but not to the whole provisioning procedure. For the provisioning procedure, the timeout should be at least 60 seconds as explained in section 5.4.4. Signed-off-by: Pavel Vasilyev <[email protected]>
1 parent e9a20cc commit 3e14c13

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

subsys/bluetooth/mesh/prov_bearer.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#define PROTOCOL_TIMEOUT K_SECONDS(60)
7+
/** Provisioning protocol timeout in seconds. */
8+
#define PROTOCOL_TIMEOUT_SEC 60
9+
10+
/** Provisioning protocol timeout. */
11+
#define PROTOCOL_TIMEOUT K_SECONDS(PROTOCOL_TIMEOUT_SEC)
812

913
/** @def PROV_BEARER_BUF_HEADROOM
1014
*

subsys/bluetooth/mesh/rpr_cli.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ static void link_report(struct bt_mesh_rpr_cli *cli,
5959
bearer.link = BEARER_LINK_OPENED;
6060
LOG_DBG("Opened");
6161
bearer.cb->link_opened(&pb_remote_cli, &ctx);
62+
63+
/* PB-Remote Open Link procedure timeout is configurable, but the provisioning
64+
* protocol timeout is not. Use default provisioning protocol timeout.
65+
*/
66+
cli->link.time = PROTOCOL_TIMEOUT_SEC;
6267
return;
6368
}
6469

0 commit comments

Comments
 (0)