From 93d25321b6ee228dd1f8e83b4f83ee741dc2e356 Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Wed, 15 Jan 2020 16:50:45 +0100 Subject: [PATCH] Bluetooth: shell: Add shell command for advertise with identity option Add shell command for advertise with identity option to have the possibility to temporarily disable privacy feature in the advertise from the shell. Signed-off-by: Joakim Andersson --- subsys/bluetooth/shell/bt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/shell/bt.c b/subsys/bluetooth/shell/bt.c index 4584a8c6473..090dd6a0ab0 100644 --- a/subsys/bluetooth/shell/bt.c +++ b/subsys/bluetooth/shell/bt.c @@ -657,6 +657,8 @@ static int cmd_advertise(const struct shell *shell, size_t argc, char *argv[]) param.options |= BT_LE_ADV_OPT_FILTER_SCAN_REQ; } else if (!strcmp(arg, "wl-conn")) { param.options |= BT_LE_ADV_OPT_FILTER_CONN; + } else if (!strcmp(arg, "identity")) { + param.options |= BT_LE_ADV_OPT_USE_IDENTITY; } else { goto fail; } @@ -1696,8 +1698,8 @@ SHELL_STATIC_SUBCMD_SET_CREATE(bt_cmds, #if defined(CONFIG_BT_BROADCASTER) SHELL_CMD_ARG(advertise, NULL, " [mode: discov, non_discov] " - "[whitelist: wl, wl-scan, wl-conn]", - cmd_advertise, 2, 2), + "[whitelist: wl, wl-scan, wl-conn] [identity]", + cmd_advertise, 2, 3), #if defined(CONFIG_BT_PERIPHERAL) SHELL_CMD_ARG(directed-adv, NULL, HELP_ADDR_LE " [mode: low]", cmd_directed_adv, 3, 1),