Skip to content

Commit

Permalink
bsim: bluetooth: mesh: Increase Net Transmit Count value on the node
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
PavelVPV authored and LingaoM committed Oct 18, 2023
1 parent c938a53 commit 17730f9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/bsim/bluetooth/mesh/src/test_persistence.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit 17730f9

Please sign in to comment.