Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hcitool: add bdaddr type option to lecc
@ 2011-02-10  5:48 Emeltchenko Andrei
  0 siblings, 0 replies; 3+ messages in thread
From: Emeltchenko Andrei @ 2011-02-10  5:48 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>

---
 tools/hcitool.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/hcitool.c b/tools/hcitool.c
index 536d407..c097526 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -2420,7 +2420,7 @@ static struct option lecc_options[] = {
 
 static const char *lecc_help =
 	"Usage:\n"
-	"\tlecc <bdaddr>\n";
+	"\tlecc <bdaddr> [conn type]\n";
 
 static void cmd_lecc(int dev_id, int argc, char **argv)
 {
@@ -2437,7 +2437,7 @@ static void cmd_lecc(int dev_id, int argc, char **argv)
 			return;
 		}
 	}
-	helper_arg(1, 1, &argc, &argv, lecc_help);
+	helper_arg(1, 2, &argc, &argv, lecc_help);
 
 	if (dev_id < 0)
 		dev_id = hci_get_route(NULL);
@@ -2450,10 +2450,14 @@ static void cmd_lecc(int dev_id, int argc, char **argv)
 
 	str2ba(argv[0], &bdaddr);
 
+	if (argc == 2)
+		peer_bdaddr_type = atoi(argv[1]);
+	else	
+		peer_bdaddr_type = 0;
+
 	interval = htobs(0x0004);
 	window = htobs(0x0004);
 	initiator_filter = 0x00;
-	peer_bdaddr_type = 0x00;
 	own_bdaddr_type = 0x00;
 	min_interval = htobs(0x000F);
 	max_interval = htobs(0x000F);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] Bluetooth: hcitool: add bdaddr type option to lecc
@ 2011-02-10  0:59 Emeltchenko Andrei
  2011-02-11 11:14 ` Anderson Lizardo
  0 siblings, 1 reply; 3+ messages in thread
From: Emeltchenko Andrei @ 2011-02-10  0:59 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>

---
 tools/hcitool.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/hcitool.c b/tools/hcitool.c
index 536d407..c097526 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -2420,7 +2420,7 @@ static struct option lecc_options[] = {
 
 static const char *lecc_help =
 	"Usage:\n"
-	"\tlecc <bdaddr>\n";
+	"\tlecc <bdaddr> [conn type]\n";
 
 static void cmd_lecc(int dev_id, int argc, char **argv)
 {
@@ -2437,7 +2437,7 @@ static void cmd_lecc(int dev_id, int argc, char **argv)
 			return;
 		}
 	}
-	helper_arg(1, 1, &argc, &argv, lecc_help);
+	helper_arg(1, 2, &argc, &argv, lecc_help);
 
 	if (dev_id < 0)
 		dev_id = hci_get_route(NULL);
@@ -2450,10 +2450,14 @@ static void cmd_lecc(int dev_id, int argc, char **argv)
 
 	str2ba(argv[0], &bdaddr);
 
+	if (argc == 2)
+		peer_bdaddr_type = atoi(argv[1]);
+	else	
+		peer_bdaddr_type = 0;
+
 	interval = htobs(0x0004);
 	window = htobs(0x0004);
 	initiator_filter = 0x00;
-	peer_bdaddr_type = 0x00;
 	own_bdaddr_type = 0x00;
 	min_interval = htobs(0x000F);
 	max_interval = htobs(0x000F);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-11 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10  5:48 [PATCH] Bluetooth: hcitool: add bdaddr type option to lecc Emeltchenko Andrei
  -- strict thread matches above, loose matches on Subject: below --
2011-02-10  0:59 Emeltchenko Andrei
2011-02-11 11:14 ` Anderson Lizardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox