From faecdff7a2679b863fb068a19d0980dbf96ba203 Mon Sep 17 00:00:00 2001 From: Rubin Gerritsen Date: Fri, 9 Jun 2023 09:59:34 +0200 Subject: [PATCH] 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 --- samples/bluetooth/iso_connected_benchmark/src/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/samples/bluetooth/iso_connected_benchmark/src/main.c b/samples/bluetooth/iso_connected_benchmark/src/main.c index 6bcdb336d5d..d4db2687864 100644 --- a/samples/bluetooth/iso_connected_benchmark/src/main.c +++ b/samples/bluetooth/iso_connected_benchmark/src/main.c @@ -1012,7 +1012,12 @@ static int run_peripheral(void) } LOG_INF("Starting advertising"); - err = bt_le_adv_start(BT_LE_ADV_CONN_NAME, NULL, 0, NULL, 0); + err = bt_le_adv_start( + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_ONE_TIME | BT_LE_ADV_OPT_CONNECTABLE | + BT_LE_ADV_OPT_USE_NAME | + BT_LE_ADV_OPT_FORCE_NAME_IN_AD, + BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL), + NULL, 0, NULL, 0); if (err != 0) { LOG_ERR("Advertising failed to start: %d", err); return err;