Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alwa-nordic committed Jun 6, 2024
1 parent d234fd1 commit 2f8795b
Show file tree
Hide file tree
Showing 33 changed files with 79 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,10 @@ static bool rpa_expired_cb(struct bt_le_ext_adv *adv)
static int create_adv(struct bt_le_ext_adv **adv)
{
int err;
struct bt_le_adv_param params;

memset(&params, 0, sizeof(struct bt_le_adv_param));

params.options |= BT_LE_ADV_OPT_CONNECTABLE;
params.options |= BT_LE_ADV_OPT_EXT_ADV;

params.id = BT_ID_DEFAULT;
params.sid = 0;
params.interval_min = BT_GAP_ADV_FAST_INT_MIN_2;
params.interval_max = BT_GAP_ADV_FAST_INT_MAX_2;

adv_cb.rpa_expired = rpa_expired_cb;

err = bt_le_ext_adv_create(&params, &adv_cb, adv);
err = bt_le_ext_adv_create(BT_LE_EXT_ADV_CONN, &adv_cb, adv);
if (err) {
LOG_ERR("Failed to create advertiser (%d)", err);
return -1;
Expand Down
2 changes: 1 addition & 1 deletion samples/bluetooth/hci_pwr_ctrl/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static K_THREAD_STACK_DEFINE(pwr_thread_stack, 512);
static const int8_t txpower[DEVICE_BEACON_TXPOWER_NUM] = {4, 0, -3, -8,
-15, -18, -23, -30};
static const struct bt_le_adv_param *param =
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME, 0x0020, 0x0020, NULL);
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, 0x0020, 0x0020, NULL);

static void read_conn_rssi(uint16_t handle, int8_t *rssi)
{
Expand Down
5 changes: 1 addition & 4 deletions samples/bluetooth/iso_connected_benchmark/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,10 +1278,7 @@ static int run_peripheral(void)
}

LOG_INF("Starting advertising");
err = bt_le_adv_start(
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_ONE_TIME | BT_LE_ADV_OPT_CONNECTABLE,
BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL),
NULL, 0, sd, ARRAY_SIZE(sd));
err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_1, NULL, 0, sd, ARRAY_SIZE(sd));
if (err != 0) {
LOG_ERR("Advertising failed to start: %d", err);
return err;
Expand Down
7 changes: 3 additions & 4 deletions samples/bluetooth/periodic_sync_rsp/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,9 @@ int main(void)
}

do {
err = bt_le_adv_start(
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_ONE_TIME | BT_LE_ADV_OPT_CONNECTABLE,
BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL),
NULL, 0, sd, ARRAY_SIZE(sd));
err = bt_le_adv_start(BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2,
BT_GAP_ADV_FAST_INT_MAX_2, NULL),
NULL, 0, sd, ARRAY_SIZE(sd));
if (err && err != -EALREADY) {
printk("Advertising failed to start (err %d)\n", err);

Expand Down
4 changes: 1 addition & 3 deletions samples/bluetooth/peripheral_hr/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ int main(void)
.id = BT_ID_DEFAULT,
.sid = 0U,
.secondary_max_skip = 0U,
.options = (BT_LE_ADV_OPT_EXT_ADV |
BT_LE_ADV_OPT_CONNECTABLE |
BT_LE_ADV_OPT_CODED),
.options = (BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_CODED),
.interval_min = BT_GAP_ADV_FAST_INT_MIN_2,
.interval_max = BT_GAP_ADV_FAST_INT_MAX_2,
.peer = NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ static void adv_start(struct k_work *work)
.id = BT_ID_DEFAULT,
.sid = 0,
.secondary_max_skip = 0,
.options = (BT_LE_ADV_OPT_CONNECTABLE |
BT_LE_ADV_OPT_ONE_TIME),
.options = (BT_LE_ADV_OPT_CONN),
.interval_min = 0x0020, /* 20 ms */
.interval_max = 0x0020, /* 20 ms */
.peer = NULL,
Expand Down
2 changes: 1 addition & 1 deletion tests/bluetooth/common/testlib/src/adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int bt_testlib_adv_conn(struct bt_conn **conn, int id, const char *name)
param.id = id;
param.interval_min = BT_GAP_ADV_FAST_INT_MIN_1;
param.interval_max = BT_GAP_ADV_FAST_INT_MAX_1;
param.options |= BT_LE_ADV_OPT_CONNECTABLE;
param.options |= BT_LE_ADV_OPT_CONN;

k_condvar_init(&ctx.done);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ ZTEST(bt_id_adv_random_addr_check, test_check_returns_false_advertise_with_local

atomic_set_bit(bt_dev.flags, BT_DEV_SCANNING);

adv_param.options &= ~BT_LE_ADV_OPT_CONNECTABLE;
adv_param.options &= ~BT_LE_ADV_OPT_CONN;
adv_param.options |= BT_LE_ADV_OPT_USE_IDENTITY;
bt_dev.id_addr[BT_ID_DEFAULT].type = BT_ADDR_LE_RANDOM;

Expand Down
22 changes: 11 additions & 11 deletions tests/bluetooth/host/id/bt_id_set_adv_own_addr/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ZTEST_SUITE(bt_id_set_adv_own_addr, NULL, NULL, NULL, NULL, NULL);
* privacy is enabled and 'BT_LE_ADV_OPT_USE_IDENTITY' options bit isn't set.
*
* Constraints:
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit is set
* - Options 'BT_LE_ADV_OPT_CONN' bit is set
* - Options 'BT_LE_ADV_OPT_USE_IDENTITY' bit isn't set
* - 'CONFIG_BT_PRIVACY' is enabled
* - bt_id_set_adv_private_addr() succeeds and returns 0
Expand All @@ -53,7 +53,7 @@ ZTEST(bt_id_set_adv_own_addr, test_bt_id_set_adv_private_addr_succeeds_adv_conne

Z_TEST_SKIP_IFNDEF(CONFIG_BT_PRIVACY);

options |= BT_LE_ADV_OPT_CONNECTABLE;
options |= BT_LE_ADV_OPT_CONN;

/* This will cause bt_id_set_adv_private_addr() to return 0 */
atomic_set_bit(bt_dev.flags, BT_DEV_RPA_VALID);
Expand Down Expand Up @@ -82,7 +82,7 @@ ZTEST(bt_id_set_adv_own_addr, test_bt_id_set_adv_private_addr_succeeds_adv_conne
* bt_id_set_adv_random_addr() if privacy isn't enabled.
*
* Constraints:
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit is set
* - Options 'BT_LE_ADV_OPT_CONN' bit is set
* - 'CONFIG_BT_PRIVACY' isn't enabled
* - bt_id_set_adv_random_addr() succeeds and returns 0
*
Expand All @@ -102,7 +102,7 @@ ZTEST(bt_id_set_adv_own_addr, test_bt_id_set_adv_random_addr_succeeds_adv_connec
/* If 'CONFIG_BT_EXT_ADV' is defined, it changes bt_id_set_adv_random_addr() behaviour */
Z_TEST_SKIP_IFDEF(CONFIG_BT_EXT_ADV);

options |= BT_LE_ADV_OPT_CONNECTABLE;
options |= BT_LE_ADV_OPT_CONN;

adv.id = 0;
bt_addr_le_copy(&bt_dev.id_addr[adv.id], BT_RPA_LE_ADDR);
Expand Down Expand Up @@ -132,12 +132,12 @@ ZTEST(bt_id_set_adv_own_addr, test_bt_id_set_adv_random_addr_succeeds_adv_connec
/*
* Test setting the advertising private address with a static random address through
* bt_id_set_adv_random_addr() when device isn't advertising as a connectable device (i.e.
* BT_LE_ADV_OPT_CONNECTABLE bit in options isn't set) and the advertisement is using the device
* BT_LE_ADV_OPT_CONN bit in options isn't set) and the advertisement is using the device
* identity (i.e. BT_LE_ADV_OPT_USE_IDENTITY bit is set in options).
*
* Constraints:
* - Options 'BT_LE_ADV_OPT_USE_IDENTITY' bit is set
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit isn't set
* - Options 'BT_LE_ADV_OPT_CONN' bit isn't set
* - bt_id_set_adv_random_addr() succeeds and returns 0
*
* Expected behaviour:
Expand All @@ -156,7 +156,7 @@ ZTEST(bt_id_set_adv_own_addr, test_bt_id_set_adv_random_addr_succeeds_not_connec
Z_TEST_SKIP_IFDEF(CONFIG_BT_EXT_ADV);

options |= BT_LE_ADV_OPT_USE_IDENTITY;
options &= ~BT_LE_ADV_OPT_CONNECTABLE;
options &= ~BT_LE_ADV_OPT_CONN;

adv.id = 0;
bt_addr_le_copy(&bt_dev.id_addr[adv.id], BT_RPA_LE_ADDR);
Expand All @@ -178,7 +178,7 @@ ZTEST(bt_id_set_adv_own_addr, test_bt_id_set_adv_random_addr_succeeds_not_connec
* 'BT_LE_ADV_OPT_USE_IDENTITY' and 'BT_LE_ADV_OPT_USE_IDENTITY' options bits aren't set.
*
* Constraints:
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit isn't set
* - Options 'BT_LE_ADV_OPT_CONN' bit isn't set
* - Options 'BT_LE_ADV_OPT_USE_IDENTITY' bit isn't set
* - bt_id_set_adv_random_addr() succeeds and returns 0
*
Expand All @@ -196,7 +196,7 @@ ZTEST(bt_id_set_adv_own_addr, test_bt_id_set_adv_private_addr_succeeds_not_conne

Z_TEST_SKIP_IFNDEF(CONFIG_BT_EXT_ADV);

options &= ~BT_LE_ADV_OPT_CONNECTABLE;
options &= ~BT_LE_ADV_OPT_CONN;
options &= ~BT_LE_ADV_OPT_USE_IDENTITY;

/* This will cause bt_id_set_adv_private_addr() to return 0 */
Expand All @@ -216,7 +216,7 @@ ZTEST(bt_id_set_adv_own_addr, test_bt_id_set_adv_private_addr_succeeds_not_conne
* before updating the device advertising address and then re-enable it after the update is done.
*
* Constraints:
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit isn't set
* - Options 'BT_LE_ADV_OPT_CONN' bit isn't set
* - Options 'BT_LE_ADV_OPT_USE_IDENTITY' bit isn't set
*
* Expected behaviour:
Expand All @@ -233,7 +233,7 @@ ZTEST(bt_id_set_adv_own_addr, test_observer_scanning_re_enabled_after_updating_a
Z_TEST_SKIP_IFDEF(CONFIG_BT_EXT_ADV);
Z_TEST_SKIP_IFNDEF(CONFIG_BT_OBSERVER);

options &= ~BT_LE_ADV_OPT_CONNECTABLE;
options &= ~BT_LE_ADV_OPT_CONN;
options &= ~BT_LE_ADV_OPT_USE_IDENTITY;

/* Set device scanning active flag */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_null_address_type_reference)
* Constraints:
* - Directed advertising flag is set
* - 'BT_LE_FEAT_BIT_PRIVACY' bit isn't set
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit is set
* - Options 'BT_LE_ADV_OPT_CONN' bit is set
* - Options 'BT_LE_ADV_OPT_DIR_ADDR_RPA' bit is set
*
* Expected behaviour:
Expand All @@ -71,7 +71,7 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_dir_adv_with_rpa_no_privacy)
struct bt_le_ext_adv adv = {0};
uint8_t own_addr_type = BT_ADDR_LE_ANONYMOUS;

options |= BT_LE_ADV_OPT_CONNECTABLE;
options |= BT_LE_ADV_OPT_CONN;
options |= BT_LE_ADV_OPT_DIR_ADDR_RPA;

bt_dev.le.features[(BT_LE_FEAT_BIT_PRIVACY) >> 3] &= ~BIT((BT_LE_FEAT_BIT_PRIVACY)&7);
Expand All @@ -87,7 +87,7 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_dir_adv_with_rpa_no_privacy)
* Operation fails if bt_id_set_adv_private_addr() failed and a negative error code is returned.
*
* Constraints:
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit is set
* - Options 'BT_LE_ADV_OPT_CONN' bit is set
* - Options 'BT_LE_ADV_OPT_USE_IDENTITY' bit isn't set
* - 'CONFIG_BT_PRIVACY' is enabled
* - bt_id_set_adv_private_addr() fails and returns a negative error code (failure)
Expand All @@ -104,7 +104,7 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_bt_id_set_adv_private_addr_fai

Z_TEST_SKIP_IFNDEF(CONFIG_BT_PRIVACY);

options |= BT_LE_ADV_OPT_CONNECTABLE;
options |= BT_LE_ADV_OPT_CONN;

err = bt_id_set_adv_own_addr(&adv, options, true, &own_addr_type);

Expand All @@ -119,7 +119,7 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_bt_id_set_adv_private_addr_fai
* Operation fails if bt_id_set_adv_random_addr() failed and a negative error code is returned.
*
* Constraints:
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit is set
* - Options 'BT_LE_ADV_OPT_CONN' bit is set
* - 'CONFIG_BT_PRIVACY' isn't enabled
* - bt_id_set_adv_random_addr() fails and returns a negative error code (failure)
*
Expand All @@ -137,7 +137,7 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_bt_id_set_adv_random_addr_fail
/* If 'CONFIG_BT_EXT_ADV' is defined, it changes bt_id_set_adv_random_addr() behaviour */
Z_TEST_SKIP_IFDEF(CONFIG_BT_EXT_ADV);

options |= BT_LE_ADV_OPT_CONNECTABLE;
options |= BT_LE_ADV_OPT_CONN;

adv.id = 0;
bt_addr_le_copy(&bt_dev.id_addr[adv.id], BT_RPA_LE_ADDR);
Expand All @@ -152,14 +152,14 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_bt_id_set_adv_random_addr_fail
/*
* Test setting the advertising private address with a static random address through
* bt_id_set_adv_random_addr() when device isn't advertising as a connectable device (i.e.
* BT_LE_ADV_OPT_CONNECTABLE bit in options isn't set) and the advertisement is using the device
* BT_LE_ADV_OPT_CONN bit in options isn't set) and the advertisement is using the device
* identity (i.e. BT_LE_ADV_OPT_USE_IDENTITY bit is set in options).
*
* Operation fails if bt_id_set_adv_random_addr() failed and a negative error code is returned.
*
* Constraints:
* - Options 'BT_LE_ADV_OPT_USE_IDENTITY' bit is set
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit isn't set
* - Options 'BT_LE_ADV_OPT_CONN' bit isn't set
* - bt_id_set_adv_random_addr() fails and returns a negative error code (failure)
*
* Expected behaviour:
Expand All @@ -176,7 +176,7 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_bt_id_set_adv_random_addr_fail
Z_TEST_SKIP_IFDEF(CONFIG_BT_EXT_ADV);

options |= BT_LE_ADV_OPT_USE_IDENTITY;
options &= ~BT_LE_ADV_OPT_CONNECTABLE;
options &= ~BT_LE_ADV_OPT_CONN;

adv.id = 0;
bt_addr_le_copy(&bt_dev.id_addr[adv.id], BT_RPA_LE_ADDR);
Expand All @@ -192,7 +192,7 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_bt_id_set_adv_random_addr_fail
* Operation fails if bt_id_set_adv_private_addr() failed and a negative error code is returned.
*
* Constraints:
* - Options 'BT_LE_ADV_OPT_CONNECTABLE' bit isn't set
* - Options 'BT_LE_ADV_OPT_CONN' bit isn't set
* - Options 'BT_LE_ADV_OPT_USE_IDENTITY' bit isn't set
* - bt_id_set_adv_private_addr() fails and returns a negative error code (failure)
*
Expand All @@ -206,7 +206,7 @@ ZTEST(bt_id_set_adv_own_addr_invalid_inputs, test_bt_id_set_adv_private_addr_fai
struct bt_le_ext_adv adv = {0};
uint8_t own_addr_type = BT_ADDR_LE_ANONYMOUS;

options &= ~BT_LE_ADV_OPT_CONNECTABLE;
options &= ~BT_LE_ADV_OPT_CONN;
options &= ~BT_LE_ADV_OPT_USE_IDENTITY;

/* This will cause bt_id_set_adv_private_addr() to return a negative error code */
Expand Down
14 changes: 5 additions & 9 deletions tests/bluetooth/tester/src/btp_gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ int tester_gap_create_adv_instance(struct bt_le_adv_param *param, uint8_t own_ad
}

if (atomic_test_bit(&current_settings, BTP_GAP_SETTINGS_CONNECTABLE)) {
param->options |= BT_LE_ADV_OPT_CONNECTABLE;
param->options |= BT_LE_ADV_OPT_CONN;

if (filter_list_in_use) {
param->options |= BT_LE_ADV_OPT_FILTER_CONN;
Expand Down Expand Up @@ -677,10 +677,8 @@ static uint8_t start_advertising(const void *cmd, uint16_t cmd_len,
{
const struct btp_gap_start_advertising_cmd *cp = cmd;
struct btp_gap_start_advertising_rp *rp = rsp;
struct bt_le_adv_param param = BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_ONE_TIME,
BT_GAP_ADV_FAST_INT_MIN_2,
BT_GAP_ADV_FAST_INT_MAX_2,
NULL);
struct bt_le_adv_param param =
BT_LE_ADV_PARAM_INIT(0, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL);
uint8_t own_addr_type;
uint32_t duration;
uint8_t adv_len;
Expand Down Expand Up @@ -1432,10 +1430,8 @@ static struct bt_le_per_adv_sync_cb pa_sync_cb = {
int tester_gap_padv_configure(const struct bt_le_per_adv_param *param)
{
int err;
struct bt_le_adv_param ext_adv_param = BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_ONE_TIME,
param->interval_min,
param->interval_max,
NULL);
struct bt_le_adv_param ext_adv_param =
BT_LE_ADV_PARAM_INIT(0, param->interval_min, param->interval_max, NULL);

if (ext_adv == NULL) {
current_settings = BIT(BTP_GAP_SETTINGS_DISCOVERABLE) |
Expand Down
4 changes: 2 additions & 2 deletions tests/bsim/bluetooth/audio/src/bap_unicast_server_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@ static void test_main_acl_disconnect(void)
*/
for (size_t i = 0U; i < ARRAY_SIZE(dummy_ext_adv); i++) {
const struct bt_le_adv_param param = BT_LE_ADV_PARAM_INIT(
(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONNECTABLE),
BT_GAP_ADV_SLOW_INT_MAX, BT_GAP_ADV_SLOW_INT_MAX, NULL);
(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN), BT_GAP_ADV_SLOW_INT_MAX,
BT_GAP_ADV_SLOW_INT_MAX, NULL);
int err;

err = bt_le_ext_adv_create(&param, NULL, &dummy_ext_adv[i]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static void create_adv(struct bt_le_ext_adv **adv)

memset(&params, 0, sizeof(struct bt_le_adv_param));

params.options |= BT_LE_ADV_OPT_CONNECTABLE;
params.options |= BT_LE_ADV_OPT_CONN;
params.options |= BT_LE_ADV_OPT_EXT_ADV;

params.id = BT_ID_DEFAULT;
Expand Down
2 changes: 1 addition & 1 deletion tests/bsim/bluetooth/host/adv/resume/src/bs_bt_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void advertise_connectable(int id, bool persist)
param.interval_min = 0x0020;
param.interval_max = 0x4000;
param.options |= persist ? 0 : BT_LE_ADV_OPT_ONE_TIME;
param.options |= BT_LE_ADV_OPT_CONNECTABLE;
param.options |= BT_LE_ADV_OPT_CONN;

err = bt_le_adv_start(&param, NULL, 0, NULL, 0);
ASSERT(err == 0, "Advertising failed to start (err %d)\n", err);
Expand Down
6 changes: 3 additions & 3 deletions tests/bsim/bluetooth/host/att/pipeline/dut/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ static void device_found(const bt_addr_le_t *addr, int8_t rssi, uint8_t type,
}

/* In your area */
#define ADV_PARAM_SINGLE BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME, \
BT_GAP_ADV_FAST_INT_MIN_2, \
BT_GAP_ADV_FAST_INT_MAX_2, NULL)
#define ADV_PARAM_SINGLE \
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, \
NULL)

static strucc bt_conn *connecc(void)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/bsim/bluetooth/host/gatt/ccc_store/src/peripheral.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static void create_adv(struct bt_le_ext_adv **adv)

memset(&params, 0, sizeof(struct bt_le_adv_param));

params.options |= BT_LE_ADV_OPT_CONNECTABLE;
params.options |= BT_LE_ADV_OPT_CONN;

params.id = BT_ID_DEFAULT;
params.sid = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void create_adv(struct bt_le_ext_adv **adv)
int err;
struct bt_le_adv_param params = {};

params.options |= BT_LE_ADV_OPT_CONNECTABLE;
params.options |= BT_LE_ADV_OPT_CONN;
params.options |= BT_LE_ADV_OPT_EXT_ADV;

params.id = BT_ID_DEFAULT;
Expand Down
3 changes: 1 addition & 2 deletions tests/bsim/bluetooth/host/gatt/settings/src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ void advertise_connectable(void)

param.interval_min = 0x0020;
param.interval_max = 0x4000;
param.options |= BT_LE_ADV_OPT_ONE_TIME;
param.options |= BT_LE_ADV_OPT_CONNECTABLE;
param.options |= BT_LE_ADV_OPT_CONN;

err = bt_le_adv_start(&param, NULL, 0, NULL, 0);
__ASSERT(err == 0, "Advertising failed to start (err %d)\n", err);
Expand Down
Loading

0 comments on commit 2f8795b

Please sign in to comment.