All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command
@ 2016-12-22 10:36 Maxime Chevallier
  2016-12-22 10:36 ` [PATCH 2/2] tools/btgatt-client: Update set-security usage Maxime Chevallier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Maxime Chevallier @ 2016-12-22 10:36 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Maxime Chevallier

Fix the interactive "set-security" command in btgatt-client, that would
always fail due to bad initialization of argv buffer :

[GATT client]# set-security 2
Usage: set_security <level>
level: 1-3
e.g.:
        set-sec-level 2
---
 tools/btgatt-client.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
index 40a03b1..afe00aa 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -1198,8 +1198,7 @@ static void set_security_usage(void)
 
 static void cmd_set_security(struct client *cli, char *cmd_str)
 {
-	char *argvbuf[1];
-	char **argv = argvbuf;
+	char *argv[2];
 	int argc = 0;
 	char *endptr = NULL;
 	int level;
-- 
2.1.4


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

* [PATCH 2/2] tools/btgatt-client: Update set-security usage
  2016-12-22 10:36 [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command Maxime Chevallier
@ 2016-12-22 10:36 ` Maxime Chevallier
  2016-12-28  9:14 ` [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command Luiz Augusto von Dentz
  2017-01-17  7:05 ` Mallikarjun Phulari
  2 siblings, 0 replies; 6+ messages in thread
From: Maxime Chevallier @ 2016-12-22 10:36 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Maxime Chevallier

---
 tools/btgatt-client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
index afe00aa..615c805 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -1190,10 +1190,10 @@ static void cmd_unregister_notify(struct client *cli, char *cmd_str)
 
 static void set_security_usage(void)
 {
-	printf("Usage: set_security <level>\n"
+	printf("Usage: set-security <level>\n"
 		"level: 1-3\n"
 		"e.g.:\n"
-		"\tset-sec-level 2\n");
+		"\tset-security 2\n");
 }
 
 static void cmd_set_security(struct client *cli, char *cmd_str)
-- 
2.1.4


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

* Re: [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command
  2016-12-22 10:36 [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command Maxime Chevallier
  2016-12-22 10:36 ` [PATCH 2/2] tools/btgatt-client: Update set-security usage Maxime Chevallier
@ 2016-12-28  9:14 ` Luiz Augusto von Dentz
  2017-01-17  7:05 ` Mallikarjun Phulari
  2 siblings, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2016-12-28  9:14 UTC (permalink / raw)
  To: Maxime Chevallier; +Cc: linux-bluetooth

Hi Maxime,

On Thu, Dec 22, 2016 at 12:36 PM, Maxime Chevallier
<maxime.chevallier@smile.fr> wrote:
> Fix the interactive "set-security" command in btgatt-client, that would
> always fail due to bad initialization of argv buffer :
>
> [GATT client]# set-security 2
> Usage: set_security <level>
> level: 1-3
> e.g.:
>         set-sec-level 2
> ---
>  tools/btgatt-client.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
> index 40a03b1..afe00aa 100644
> --- a/tools/btgatt-client.c
> +++ b/tools/btgatt-client.c
> @@ -1198,8 +1198,7 @@ static void set_security_usage(void)
>
>  static void cmd_set_security(struct client *cli, char *cmd_str)
>  {
> -       char *argvbuf[1];
> -       char **argv = argvbuf;
> +       char *argv[2];
>         int argc = 0;
>         char *endptr = NULL;
>         int level;
> --
> 2.1.4

Applied, thanks.


-- 
Luiz Augusto von Dentz

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

* Re: [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command
  2016-12-22 10:36 [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command Maxime Chevallier
  2016-12-22 10:36 ` [PATCH 2/2] tools/btgatt-client: Update set-security usage Maxime Chevallier
  2016-12-28  9:14 ` [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command Luiz Augusto von Dentz
@ 2017-01-17  7:05 ` Mallikarjun Phulari
  2017-01-17  8:51   ` Maxime CHEVALLIER
  2 siblings, 1 reply; 6+ messages in thread
From: Mallikarjun Phulari @ 2017-01-17  7:05 UTC (permalink / raw)
  To: Maxime Chevallier; +Cc: linux-bluetooth, luiz dentz

Hi i am running heart-rate service using gatt-server.
And i am using gatttool as client.
gatt-server with default security level "low" is working fine.
But when try different security levels "medium" and "high" with -s option, it is not connecting with the gatttool.

What might be the problem??

Thanks & Regards
Mallikarjun Phulari

----- Original Message -----
From: "Maxime Chevallier" <maxime.chevallier@smile.fr>
To: linux-bluetooth@vger.kernel.org
Cc: "luiz dentz" <luiz.dentz@gmail.com>, "Maxime Chevallier" <maxime.chevallier@smile.fr>
Sent: Thursday, December 22, 2016 4:06:04 PM
Subject: [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command

Fix the interactive "set-security" command in btgatt-client, that would
always fail due to bad initialization of argv buffer :

[GATT client]# set-security 2
Usage: set_security <level>
level: 1-3
e.g.:
        set-sec-level 2
---
 tools/btgatt-client.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
index 40a03b1..afe00aa 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -1198,8 +1198,7 @@ static void set_security_usage(void)
 
 static void cmd_set_security(struct client *cli, char *cmd_str)
 {
-	char *argvbuf[1];
-	char **argv = argvbuf;
+	char *argv[2];
 	int argc = 0;
 	char *endptr = NULL;
 	int level;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Disclaimer:- The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. The views expressed in this E-mail message (including the enclosure/(s) or attachment/(s) if any) are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of GlobalEdge. Before opening any mail and attachments please check them for viruses .GlobalEdge does not accept any liability for virus infected mails.


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

* Re: [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command
  2017-01-17  7:05 ` Mallikarjun Phulari
@ 2017-01-17  8:51   ` Maxime CHEVALLIER
       [not found]     ` <1666158258.518353.1485858630674.JavaMail.zimbra@globaledgesoft.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Maxime CHEVALLIER @ 2017-01-17  8:51 UTC (permalink / raw)
  To: Mallikarjun Phulari; +Cc: linux-bluetooth

Hi,

> Hi i am running heart-rate service using gatt-server.
> And i am using gatttool as client.
> gatt-server with default security level "low" is working fine.
> But when try different security levels "medium" and "high" with -s
> option, it is not connecting with the gatttool.
> 
> What might be the problem??

The patch you linked applies to the btgatt-client tool, you seem to be 
using gatttool.
When using gatttool, the option '-l' must be used to specify the 
security level.

Note that gatttool will soon be marked as deprecated, you might want to 
use btgatt-client instead.

> Thanks & Regards
> Mallikarjun Phulari

Regards,

Maxime

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

* Re: [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command
       [not found]     ` <1666158258.518353.1485858630674.JavaMail.zimbra@globaledgesoft.com>
@ 2017-01-31 10:30       ` Mallikarjun Phulari
  0 siblings, 0 replies; 6+ messages in thread
From: Mallikarjun Phulari @ 2017-01-31 10:30 UTC (permalink / raw)
  To: Maxime CHEVALLIER; +Cc: linux-bluetooth

Thats fine..
I am facing the problem with btgatt-server security options.
btgatt-server is not connecting to any clients even with btgatt-client when the security level of btgatt-server is set to "medium" or "high".

btagatt-server is working fine with the security level "low"


Regards
Mallikarjun Phulari

----- Original Message -----
From: "Maxime CHEVALLIER" <maxime.chevallier@smile.fr>
To: "Mallikarjun Phulari" <p.mallikarjun@globaledgesoft.com>
Cc: linux-bluetooth@vger.kernel.org
Sent: Tuesday, January 17, 2017 2:21:42 PM
Subject: Re: [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command

Hi,

> Hi i am running heart-rate service using gatt-server.
> And i am using gatttool as client.
> gatt-server with default security level "low" is working fine.
> But when try different security levels "medium" and "high" with -s
> option, it is not connecting with the gatttool.
> 
> What might be the problem??

The patch you linked applies to the btgatt-client tool, you seem to be 
using gatttool.
When using gatttool, the option '-l' must be used to specify the 
security level.

Note that gatttool will soon be marked as deprecated, you might want to 
use btgatt-client instead.

> Thanks & Regards
> Mallikarjun Phulari

Regards,

Maxime
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Disclaimer:- The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. The views expressed in this E-mail message (including the enclosure/(s) or attachment/(s) if any) are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of GlobalEdge. Before opening any mail and attachments please check them for viruses .GlobalEdge does not accept any liability for virus infected mails.


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

end of thread, other threads:[~2017-01-31 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-22 10:36 [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command Maxime Chevallier
2016-12-22 10:36 ` [PATCH 2/2] tools/btgatt-client: Update set-security usage Maxime Chevallier
2016-12-28  9:14 ` [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command Luiz Augusto von Dentz
2017-01-17  7:05 ` Mallikarjun Phulari
2017-01-17  8:51   ` Maxime CHEVALLIER
     [not found]     ` <1666158258.518353.1485858630674.JavaMail.zimbra@globaledgesoft.com>
2017-01-31 10:30       ` Mallikarjun Phulari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.