Skip to content

Commit 7ade4a2

Browse files
cvinayakcarlescufi
authored andcommitted
tests: Bluetooth: bsim: Use wait lower than advertising interval
Fix failure due to advertising report count being incremented faster than the wait loop that had longer delay compared to the received interval of the advertising report. Fixes #37652. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 7b9fbcd commit 7ade4a2

File tree

1 file changed

+3
-2
lines changed
  • tests/bluetooth/bsim_bt/bsim_test_advx/src

1 file changed

+3
-2
lines changed

tests/bluetooth/bsim_bt/bsim_test_advx/src/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
#define EVT_PROP_SCAN BIT(1)
2727
#define EVT_PROP_ANON BIT(5)
2828
#define EVT_PROP_TXP BIT(6)
29-
#define ADV_INTERVAL 0x20
29+
#define ADV_INTERVAL 0x20 /* 20 ms advertising interval */
30+
#define ADV_WAIT_MS 10 /* 10 ms wait loop */
3031
#define OWN_ADDR_TYPE 1
3132
#define PEER_ADDR_TYPE 0
3233
#define PEER_ADDR NULL
@@ -1340,7 +1341,7 @@ static void test_scanx_main(void)
13401341
printk("Waiting...");
13411342
while (!is_periodic ||
13421343
(per_adv_evt_cnt_actual != per_adv_evt_cnt_expected)) {
1343-
k_sleep(K_MSEC(30));
1344+
k_sleep(K_MSEC(ADV_WAIT_MS));
13441345
}
13451346
printk("done.\n");
13461347

0 commit comments

Comments
 (0)