Skip to content

Commit faecdff

Browse files
rugeGerritsennashif
authored andcommitted
Samples: iso_connected_benchmark: Use BT_LE_ADV_OPT_ONE_TIME
It is not intentional to continue advertising once a connection has been established for two reasons: 1. We do not configure enough connection contexts for this 2. We don't want to generate controller scheduling conflicts that can possibly reduce performance. Signed-off-by: Rubin Gerritsen <[email protected]>
1 parent 1a3fd59 commit faecdff

File tree

1 file changed

+6
-1
lines changed
  • samples/bluetooth/iso_connected_benchmark/src

1 file changed

+6
-1
lines changed

samples/bluetooth/iso_connected_benchmark/src/main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,12 @@ static int run_peripheral(void)
10121012
}
10131013

10141014
LOG_INF("Starting advertising");
1015-
err = bt_le_adv_start(BT_LE_ADV_CONN_NAME, NULL, 0, NULL, 0);
1015+
err = bt_le_adv_start(
1016+
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_ONE_TIME | BT_LE_ADV_OPT_CONNECTABLE |
1017+
BT_LE_ADV_OPT_USE_NAME |
1018+
BT_LE_ADV_OPT_FORCE_NAME_IN_AD,
1019+
BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL),
1020+
NULL, 0, NULL, 0);
10161021
if (err != 0) {
10171022
LOG_ERR("Advertising failed to start: %d", err);
10181023
return err;

0 commit comments

Comments
 (0)