* [PATCH] Add PSM option for GATT/ATT over BR/EDR on gatttool
@ 2010-10-05 17:15 Claudio Takahasi
2010-10-05 20:27 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Claudio Takahasi @ 2010-10-05 17:15 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Claudio Takahasi
---
TODO | 6 ------
attrib/gatttool.c | 6 ++++--
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/TODO b/TODO
index 41ec7a7..0a82f5c 100644
--- a/TODO
+++ b/TODO
@@ -40,12 +40,6 @@ ATT/GATT
Priority: Low
Complexity: C1
-- Add command line support for specifying psm with gatttool (e.g. --psm
- 37)
-
- Priority: Medium
- Complexity: C1
-
- Add command line support to use medium instead of (default) low
security level with gatttool (--sec-level)
diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 76fe62c..2de3f8b 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
@@ -43,7 +43,6 @@
#include "gattrib.h"
#include "gatt.h"
-#define GATT_PSM 0x1f
/* Minimum MTU for L2CAP connections over BR/EDR */
#define ATT_MIN_MTU_L2CAP 48
#define GATT_CID 4
@@ -55,6 +54,7 @@ static int opt_start = 0x0001;
static int opt_end = 0xffff;
static int opt_handle = -1;
static int opt_mtu = 0;
+static int opt_psm = 0x1f;
static gboolean opt_primary = FALSE;
static gboolean opt_characteristics = FALSE;
static gboolean opt_char_read = FALSE;
@@ -122,7 +122,7 @@ static GIOChannel *do_connect(gboolean le)
chan = bt_io_connect(BT_IO_L2CAP, connect_cb, NULL, NULL, &err,
BT_IO_OPT_SOURCE_BDADDR, &sba,
BT_IO_OPT_DEST_BDADDR, &dba,
- BT_IO_OPT_PSM, GATT_PSM,
+ BT_IO_OPT_PSM, opt_psm,
BT_IO_OPT_OMTU, opt_mtu,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW,
BT_IO_OPT_INVALID);
@@ -518,6 +518,8 @@ static GOptionEntry options[] = {
"Specify remote Bluetooth address", "MAC" },
{ "mtu", 'm', 0, G_OPTION_ARG_INT, &opt_mtu,
"Specify the MTU size", "MTU" },
+ { "psm", 'p', 0, G_OPTION_ARG_INT, &opt_psm,
+ "Specify the PSM for GATT/ATT over BR/EDR", "PSM" },
{ NULL },
};
--
1.7.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Add PSM option for GATT/ATT over BR/EDR on gatttool
2010-10-05 17:15 [PATCH] Add PSM option for GATT/ATT over BR/EDR on gatttool Claudio Takahasi
@ 2010-10-05 20:27 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2010-10-05 20:27 UTC (permalink / raw)
To: Claudio Takahasi; +Cc: linux-bluetooth
Hi Claudio,
On Tue, Oct 05, 2010, Claudio Takahasi wrote:
> ---
> TODO | 6 ------
> attrib/gatttool.c | 6 ++++--
> 2 files changed, 4 insertions(+), 8 deletions(-)
The patch has been pushed upstream. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-05 20:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 17:15 [PATCH] Add PSM option for GATT/ATT over BR/EDR on gatttool Claudio Takahasi
2010-10-05 20:27 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox