From e66de31c5a6dd4611aa857063cb5e7fcc7e3a918 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 15 Oct 2013 14:30:02 -0700 Subject: [PATCH] tools: Add command for setting limited discoverable mode --- tools/btmgmt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/btmgmt.c b/tools/btmgmt.c index 513322783..1d71d74f5 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -900,7 +900,7 @@ static void cmd_discov(struct mgmt *mgmt, uint16_t index, int argc, struct mgmt_cp_set_discoverable cp; if (argc < 2) { - printf("Usage: btmgmt %s [timeout]\n", argv[0]); + printf("Usage: btmgmt %s [timeout]\n", argv[0]); exit(EXIT_FAILURE); } @@ -910,6 +910,8 @@ static void cmd_discov(struct mgmt *mgmt, uint16_t index, int argc, cp.val = 1; else if (strcasecmp(argv[1], "off") == 0) cp.val = 0; + else if (strcasecmp(argv[1], "limited") == 0) + cp.val = 2; else cp.val = atoi(argv[1]); -- 2.47.3