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 <rubin.gerritsen@nordicsemi.no>
This commit is contained in:
parent
1a3fd597a8
commit
faecdff7a2
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue