Bluetooth: Deprecate adv auto-resume
The host-based adv auto-resume function has both a problematic implementation and disagreement in the community around how it should behave. See the issue linked resolved below for details. This patch makes the deprecation visible to the user. The user will be better served by a auto-resume tailored their applications use case, based on more primitive host API like `conn_cb.recycled`, which has obvious behavior that is unlikely to change. Resolves: https://github.com/zephyrproject-rtos/zephyr/issues/72567 Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This commit is contained in:
parent
d7ab4f25e1
commit
8cfad44852
96 changed files with 396 additions and 275 deletions
|
@ -2003,7 +2003,7 @@ static int cmd_advertise(const struct shell *sh, size_t argc, char *argv[])
|
|||
param.interval_max = BT_GAP_ADV_FAST_INT_MAX_2;
|
||||
|
||||
if (!strcmp(argv[1], "on")) {
|
||||
param.options = BT_LE_ADV_OPT_CONNECTABLE;
|
||||
param.options = BT_LE_ADV_OPT_CONN;
|
||||
} else if (!strcmp(argv[1], "nconn")) {
|
||||
param.options = 0U;
|
||||
} else {
|
||||
|
@ -2033,8 +2033,6 @@ static int cmd_advertise(const struct shell *sh, size_t argc, char *argv[])
|
|||
} else if (!strcmp(arg, "name-ad")) {
|
||||
name_ad = true;
|
||||
name_sd = false;
|
||||
} else if (!strcmp(arg, "one-time")) {
|
||||
param.options |= BT_LE_ADV_OPT_ONE_TIME;
|
||||
} else if (!strcmp(arg, "disable-37")) {
|
||||
param.options |= BT_LE_ADV_OPT_DISABLE_CHAN_37;
|
||||
} else if (!strcmp(arg, "disable-38")) {
|
||||
|
@ -2058,7 +2056,7 @@ static int cmd_advertise(const struct shell *sh, size_t argc, char *argv[])
|
|||
|
||||
atomic_clear(adv_opt);
|
||||
atomic_set_bit_to(adv_opt, SHELL_ADV_OPT_CONNECTABLE,
|
||||
(param.options & BT_LE_ADV_OPT_CONNECTABLE) > 0);
|
||||
(param.options & BT_LE_ADV_OPT_CONN) > 0);
|
||||
atomic_set_bit_to(adv_opt, SHELL_ADV_OPT_DISCOVERABLE, discoverable);
|
||||
atomic_set_bit_to(adv_opt, SHELL_ADV_OPT_APPEARANCE, appearance);
|
||||
|
||||
|
@ -2143,10 +2141,10 @@ static bool adv_param_parse(size_t argc, char *argv[],
|
|||
memset(param, 0, sizeof(struct bt_le_adv_param));
|
||||
|
||||
if (!strcmp(argv[1], "conn-scan")) {
|
||||
param->options |= BT_LE_ADV_OPT_CONNECTABLE;
|
||||
param->options |= BT_LE_ADV_OPT_CONN;
|
||||
param->options |= BT_LE_ADV_OPT_SCANNABLE;
|
||||
} else if (!strcmp(argv[1], "conn-nscan")) {
|
||||
param->options |= BT_LE_ADV_OPT_CONNECTABLE;
|
||||
param->options |= BT_LE_ADV_OPT_CONN;
|
||||
} else if (!strcmp(argv[1], "nconn-scan")) {
|
||||
param->options |= BT_LE_ADV_OPT_SCANNABLE;
|
||||
} else if (!strcmp(argv[1], "nconn-nscan")) {
|
||||
|
@ -2245,7 +2243,7 @@ static int cmd_adv_create(const struct shell *sh, size_t argc, char *argv[])
|
|||
|
||||
atomic_clear(adv_set_opt[adv_index]);
|
||||
atomic_set_bit_to(adv_set_opt[adv_index], SHELL_ADV_OPT_CONNECTABLE,
|
||||
(param.options & BT_LE_ADV_OPT_CONNECTABLE) > 0);
|
||||
(param.options & BT_LE_ADV_OPT_CONN) > 0);
|
||||
atomic_set_bit_to(adv_set_opt[adv_index], SHELL_ADV_OPT_EXT_ADV,
|
||||
(param.options & BT_LE_ADV_OPT_EXT_ADV) > 0);
|
||||
|
||||
|
@ -5006,7 +5004,7 @@ SHELL_STATIC_SUBCMD_SET_CREATE(bt_cmds,
|
|||
SHELL_CMD_ARG(advertise, NULL,
|
||||
"<type: off, on, nconn> [mode: discov, non_discov] "
|
||||
"[filter-accept-list: fal, fal-scan, fal-conn] [identity] [no-name] "
|
||||
"[one-time] [name-ad] [appearance] "
|
||||
"[name-ad] [appearance] "
|
||||
"[disable-37] [disable-38] [disable-39]",
|
||||
cmd_advertise, 2, 8),
|
||||
#if defined(CONFIG_BT_PERIPHERAL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue