From 17730f97a8ce2cfe62f523cb89bfb21d3b3a99dd Mon Sep 17 00:00:00 2001 From: Pavel Vasilyev Date: Tue, 17 Oct 2023 14:07:52 +0200 Subject: [PATCH] bsim: bluetooth: mesh: Increase Net Transmit Count value on the node This is to increase probability of reception of responses (Config Status messages) from the node when the provisioner sends a Set message and the node response with a Status message at the same time so that the message collide. Signed-off-by: Pavel Vasilyev --- tests/bsim/bluetooth/mesh/src/test_persistence.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/bsim/bluetooth/mesh/src/test_persistence.c b/tests/bsim/bluetooth/mesh/src/test_persistence.c index 24d992e48e8a62..2f8d523bede317 100644 --- a/tests/bsim/bluetooth/mesh/src/test_persistence.c +++ b/tests/bsim/bluetooth/mesh/src/test_persistence.c @@ -544,6 +544,17 @@ static void node_configure(void) uint16_t va; struct bt_mesh_cfg_cli_mod_pub pub_params; + /* Set Network Transmit Count state on the device greater than on provisioner to increase + * probability of reception responses. + */ + uint8_t net_transmit; + + net_transmit = BT_MESH_TRANSMIT(3, 20); + err = bt_mesh_cfg_cli_net_transmit_set(test_netkey_idx, TEST_ADDR, net_transmit, &status); + if (err || status != net_transmit) { + FAIL("Net transmit set failed (err %d, transmit %x)", err, status); + } + struct test_appkey_t test_appkeys[] = { { .idx = TEST_APPKEY_0_IDX, .key = TEST_APPKEY_0_KEY }, { .idx = TEST_APPKEY_1_IDX, .key = TEST_APPKEY_1_KEY },