From 0ea8cef97afe7b45719a2e181867e21f316d9347 Mon Sep 17 00:00:00 2001 From: Pavel Vasilyev Date: Thu, 8 Feb 2024 14:49:21 +0100 Subject: [PATCH] Bluetooth: Mesh: Disable randomization on Link Close in RPR server Disable randomization at the access layer in the Remote Provisioning server when sending Link Stauts message as a responce on Link Close message and then sending Link Report message right after it. Because of the randomization, the report message is sent before the status message which makes MESH/SR/RPR/PDU/BV-03-C test to fail. This fixes MESH/SR/RPR/PDU/BV-03-C test. Signed-off-by: Pavel Vasilyev --- subsys/bluetooth/mesh/rpr_srv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subsys/bluetooth/mesh/rpr_srv.c b/subsys/bluetooth/mesh/rpr_srv.c index e97df35f28f..ac3fd190880 100644 --- a/subsys/bluetooth/mesh/rpr_srv.c +++ b/subsys/bluetooth/mesh/rpr_srv.c @@ -968,6 +968,12 @@ static int handle_link_close(const struct bt_mesh_model *mod, struct bt_mesh_msg * which will be used in the link report when the link is fully closed. */ + /* Disable randomization for the Remote Provisioning Link Status message to avoid reordering + * of it with the Remote Provisioning Link Report message that shall be sent in a sequence + * when closing an active link (see section 4.4.5.5.3.3 of MshPRTv1.1). + */ + ctx->rnd_delay = false; + link_status_send(ctx, BT_MESH_RPR_SUCCESS); link_close(BT_MESH_RPR_ERR_LINK_CLOSED_BY_CLIENT, reason);