Skip to content

Commit

Permalink
Samples: Bluetooth: Mesh: Change deprecated SMP adv
Browse files Browse the repository at this point in the history
Changes common sample SMP library to not use
deprecated  ADV option BT_LE_ADV_OPT_USE_NAME.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
  • Loading branch information
Andrewpini authored and rlubos committed May 31, 2024
1 parent ddc8a82 commit 67b9db5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion samples/bluetooth/mesh/common/smp_bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ static struct bt_le_adv_param adv_params = {

static const struct bt_data ad[] = {
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
BT_DATA(BT_DATA_NAME_COMPLETE, CONFIG_BT_DEVICE_NAME, sizeof(CONFIG_BT_DEVICE_NAME) - 1),
};

static const struct bt_data sd[] = {
BT_DATA_BYTES(BT_DATA_UUID128_ALL, 0x84, 0xaa, 0x60, 0x74, 0x52, 0x8a, 0x8b, 0x86, 0xd3,
0x4c, 0xb7, 0x1d, 0x1d, 0xdc, 0x53, 0x8d),
BT_DATA(BT_DATA_NAME_COMPLETE, CONFIG_BT_DEVICE_NAME, sizeof(CONFIG_BT_DEVICE_NAME) - 1),
Expand Down Expand Up @@ -128,7 +132,7 @@ int smp_service_adv_init(void)
return err;
}

err = bt_le_ext_adv_set_data(adv, ad, ARRAY_SIZE(ad), NULL, 0);
err = bt_le_ext_adv_set_data(adv, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));
if (err) {
printk("Setting SMP service adv data failed (err %d)\n", err);
return err;
Expand Down

0 comments on commit 67b9db5

Please sign in to comment.