Bluetooth: Mesh: Disable randomization in DFD model for canceling update

Disable randomization in the access layer when cancelling update in the
distribution server model. This is needed because the server sends 2
messages in a row and the gets reordered by the access layer
randomization feature making DFU/SR/FD/BV-43-C test to fail.

This fixes DFU/SR/FD/BV-43-C test.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
Pavel Vasilyev 2024-02-08 14:47:24 +01:00 committed by Maureen Helm
commit 44f86b81a3

View file

@ -1148,6 +1148,14 @@ enum bt_mesh_dfd_status bt_mesh_dfd_srv_cancel(struct bt_mesh_dfd_srv *srv,
return BT_MESH_DFD_ERR_INTERNAL;
}
if (prev_phase == BT_MESH_DFD_PHASE_APPLYING_UPDATE && ctx) {
/* Disable randomization for the Firmware Distribution State message to avoid
* reordering when Firmware Distribution Server sends 2 messages in a row when
* cancelling the update (see section 6.2.3.10 of MshDFUv1.0).
*/
ctx->rnd_delay = false;
}
if (ctx != NULL) {
status_rsp(srv, ctx, BT_MESH_DFD_SUCCESS);
}