Bluetooth: shell: Make use of BT_LE_ADV_OPT_USE_NAME
Use BT_LE_ADV_OPT_USE_NAME whenver possible since it does properly track updates. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
a8688fc587
commit
d1c4ce8741
1 changed files with 3 additions and 10 deletions
|
@ -620,10 +620,6 @@ static const struct bt_data ad_discov[] = {
|
||||||
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
|
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct bt_data sd[] = {
|
|
||||||
BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),
|
|
||||||
};
|
|
||||||
|
|
||||||
static int cmd_advertise(int argc, char *argv[])
|
static int cmd_advertise(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct bt_le_adv_param param;
|
struct bt_le_adv_param param;
|
||||||
|
@ -649,13 +645,10 @@ static int cmd_advertise(int argc, char *argv[])
|
||||||
param.interval_max = BT_GAP_ADV_FAST_INT_MAX_2;
|
param.interval_max = BT_GAP_ADV_FAST_INT_MAX_2;
|
||||||
|
|
||||||
if (!strcmp(argv[1], "on")) {
|
if (!strcmp(argv[1], "on")) {
|
||||||
param.options = BT_LE_ADV_OPT_CONNECTABLE;
|
param.options = (BT_LE_ADV_OPT_CONNECTABLE |
|
||||||
scan_rsp = sd;
|
BT_LE_ADV_OPT_USE_NAME);
|
||||||
scan_rsp_len = ARRAY_SIZE(sd);
|
|
||||||
} else if (!strcmp(argv[1], "scan")) {
|
} else if (!strcmp(argv[1], "scan")) {
|
||||||
param.options = 0;
|
param.options = BT_LE_ADV_OPT_USE_NAME;
|
||||||
scan_rsp = sd;
|
|
||||||
scan_rsp_len = ARRAY_SIZE(sd);
|
|
||||||
} else if (!strcmp(argv[1], "nconn")) {
|
} else if (!strcmp(argv[1], "nconn")) {
|
||||||
param.options = 0;
|
param.options = 0;
|
||||||
scan_rsp = NULL;
|
scan_rsp = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue