All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 3/5] doc/gatt-api: Add authorization options for attributes
@ 2018-05-16 13:55 Grzegorz Kolodziejczyk
  2018-05-21  9:44 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: Grzegorz Kolodziejczyk @ 2018-05-16 13:55 UTC (permalink / raw)
  To: linux-bluetooth

This patch adds authorization property for attributes and prepare write
request for authorization option for write request. This is require to
handle correctly prepare writes, which may response with insufficient
authorization error.
---
 doc/gatt-api.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/gatt-api.txt b/doc/gatt-api.txt
index 0f1cc9029..7d8c427cd 100644
--- a/doc/gatt-api.txt
+++ b/doc/gatt-api.txt
@@ -85,6 +85,8 @@ Methods		array{byte} ReadValue(dict options)
 			Possible options: "offset": Start offset
 					  "device": Device path (Server only)
 					  "link": Link type (Server only)
+					  "authorize": boolean Is authorization
+						       request
 
 			Possible Errors: org.bluez.Error.Failed
 					 org.bluez.Error.InProgress
@@ -251,6 +253,12 @@ Properties	string UUID [read-only]
 				"secure-read" (Server only)
 				"secure-write" (Server only)
 
+		boolean Authorize [read-only, optional] (Server only)
+
+			True, if authorization is required for attribute
+			operations. By default this valuie is set to false for
+			attribute.
+
 Characteristic Descriptors hierarchy
 ====================================
 
@@ -284,6 +292,8 @@ Methods		array{byte} ReadValue(dict flags)
 			Possible options: "offset": Start offset
 					  "device": Device path (Server only)
 					  "link": Link type (Server only)
+					  "authorize": boolean Is authorization
+						       request
 
 			Possible Errors: org.bluez.Error.Failed
 					 org.bluez.Error.InProgress
-- 
2.13.6


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

* Re: [PATCH BlueZ v2 3/5] doc/gatt-api: Add authorization options for attributes
  2018-05-16 13:55 [PATCH BlueZ v2 3/5] doc/gatt-api: Add authorization options for attributes Grzegorz Kolodziejczyk
@ 2018-05-21  9:44 ` Luiz Augusto von Dentz
  2018-05-22  7:33   ` Grzegorz Kołodziejczyk
  0 siblings, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2018-05-21  9:44 UTC (permalink / raw)
  To: Grzegorz Kolodziejczyk; +Cc: linux-bluetooth

Hi Grzegorz,

On Wed, May 16, 2018 at 4:55 PM, Grzegorz Kolodziejczyk
<grzegorz.kolodziejczyk@codecoup.pl> wrote:
> This patch adds authorization property for attributes and prepare write
> request for authorization option for write request. This is require to
> handle correctly prepare writes, which may response with insufficient
> authorization error.

I noticed there also a new error that we should document.

> ---
>  doc/gatt-api.txt | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/doc/gatt-api.txt b/doc/gatt-api.txt
> index 0f1cc9029..7d8c427cd 100644
> --- a/doc/gatt-api.txt
> +++ b/doc/gatt-api.txt
> @@ -85,6 +85,8 @@ Methods               array{byte} ReadValue(dict options)
>                         Possible options: "offset": Start offset
>                                           "device": Device path (Server only)
>                                           "link": Link type (Server only)
> +                                         "authorize": boolean Is authorization
> +                                                      request
>
>                         Possible Errors: org.bluez.Error.Failed
>                                          org.bluez.Error.InProgress
> @@ -251,6 +253,12 @@ Properties string UUID [read-only]
>                                 "secure-read" (Server only)
>                                 "secure-write" (Server only)
>
> +               boolean Authorize [read-only, optional] (Server only)
> +
> +                       True, if authorization is required for attribute
> +                       operations. By default this valuie is set to false for
> +                       attribute.
> +
>  Characteristic Descriptors hierarchy
>  ====================================
>
> @@ -284,6 +292,8 @@ Methods             array{byte} ReadValue(dict flags)
>                         Possible options: "offset": Start offset
>                                           "device": Device path (Server only)
>                                           "link": Link type (Server only)
> +                                         "authorize": boolean Is authorization
> +                                                      request
>
>                         Possible Errors: org.bluez.Error.Failed
>                                          org.bluez.Error.InProgress
> --
> 2.13.6
>
> --
> 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



-- 
Luiz Augusto von Dentz

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

* Re: [PATCH BlueZ v2 3/5] doc/gatt-api: Add authorization options for attributes
  2018-05-21  9:44 ` Luiz Augusto von Dentz
@ 2018-05-22  7:33   ` Grzegorz Kołodziejczyk
  2018-05-22  8:01     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: Grzegorz Kołodziejczyk @ 2018-05-22  7:33 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,
pon., 21 maj 2018 o 11:44 Luiz Augusto von Dentz <luiz.dentz@gmail.com>
napisa=C5=82(a):

> Hi Grzegorz,

> On Wed, May 16, 2018 at 4:55 PM, Grzegorz Kolodziejczyk
> <grzegorz.kolodziejczyk@codecoup.pl> wrote:
> > This patch adds authorization property for attributes and prepare write
> > request for authorization option for write request. This is require to
> > handle correctly prepare writes, which may response with insufficient
> > authorization error.

> I noticed there also a new error that we should document.

You mean "org.bluez.Error.NotAuthorized" for WriteValue ? If so, it's
already documented as possible error for WriteValues.
> > ---
> >  doc/gatt-api.txt | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/doc/gatt-api.txt b/doc/gatt-api.txt
> > index 0f1cc9029..7d8c427cd 100644
> > --- a/doc/gatt-api.txt
> > +++ b/doc/gatt-api.txt
> > @@ -85,6 +85,8 @@ Methods               array{byte} ReadValue(dict
options)
> >                         Possible options: "offset": Start offset
> >                                           "device": Device path (Server
only)
> >                                           "link": Link type (Server
only)
> > +                                         "authorize": boolean Is
authorization
> > +                                                      request
> >
> >                         Possible Errors: org.bluez.Error.Failed
> >                                          org.bluez.Error.InProgress
> > @@ -251,6 +253,12 @@ Properties string UUID [read-only]
> >                                 "secure-read" (Server only)
> >                                 "secure-write" (Server only)
> >
> > +               boolean Authorize [read-only, optional] (Server only)
> > +
> > +                       True, if authorization is required for attribut=
e
> > +                       operations. By default this valuie is set to
false for
> > +                       attribute.
> > +
> >  Characteristic Descriptors hierarchy
> >  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >
> > @@ -284,6 +292,8 @@ Methods             array{byte} ReadValue(dict
flags)
> >                         Possible options: "offset": Start offset
> >                                           "device": Device path (Server
only)
> >                                           "link": Link type (Server
only)
> > +                                         "authorize": boolean Is
authorization
> > +                                                      request
> >
> >                         Possible Errors: org.bluez.Error.Failed
> >                                          org.bluez.Error.InProgress
> > --
> > 2.13.6
> >
> > --
> > 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



> --
> Luiz Augusto von Dentz

Grzegorz Ko=C5=82odziejczyk

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

* Re: [PATCH BlueZ v2 3/5] doc/gatt-api: Add authorization options for attributes
  2018-05-22  7:33   ` Grzegorz Kołodziejczyk
@ 2018-05-22  8:01     ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2018-05-22  8:01 UTC (permalink / raw)
  To: Grzegorz Kołodziejczyk; +Cc: linux-bluetooth

Hi Grzegorz,

On Tue, May 22, 2018 at 10:33 AM, Grzegorz Ko=C5=82odziejczyk
<grzegorz.kolodziejczyk@codecoup.pl> wrote:
> Hi Luiz,
> pon., 21 maj 2018 o 11:44 Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> napisa=C5=82(a):
>
>> Hi Grzegorz,
>
>> On Wed, May 16, 2018 at 4:55 PM, Grzegorz Kolodziejczyk
>> <grzegorz.kolodziejczyk@codecoup.pl> wrote:
>> > This patch adds authorization property for attributes and prepare writ=
e
>> > request for authorization option for write request. This is require to
>> > handle correctly prepare writes, which may response with insufficient
>> > authorization error.
>
>> I noticed there also a new error that we should document.
>
> You mean "org.bluez.Error.NotAuthorized" for WriteValue ? If so, it's
> already documented as possible error for WriteValues.

Nevermind, I thought InvalidValueLength was not documented but it is.

>> > ---
>> >  doc/gatt-api.txt | 10 ++++++++++
>> >  1 file changed, 10 insertions(+)
>> >
>> > diff --git a/doc/gatt-api.txt b/doc/gatt-api.txt
>> > index 0f1cc9029..7d8c427cd 100644
>> > --- a/doc/gatt-api.txt
>> > +++ b/doc/gatt-api.txt
>> > @@ -85,6 +85,8 @@ Methods               array{byte} ReadValue(dict
> options)
>> >                         Possible options: "offset": Start offset
>> >                                           "device": Device path (Serve=
r
> only)
>> >                                           "link": Link type (Server
> only)
>> > +                                         "authorize": boolean Is
> authorization
>> > +                                                      request
>> >
>> >                         Possible Errors: org.bluez.Error.Failed
>> >                                          org.bluez.Error.InProgress
>> > @@ -251,6 +253,12 @@ Properties string UUID [read-only]
>> >                                 "secure-read" (Server only)
>> >                                 "secure-write" (Server only)
>> >
>> > +               boolean Authorize [read-only, optional] (Server only)
>> > +
>> > +                       True, if authorization is required for attribu=
te
>> > +                       operations. By default this valuie is set to
> false for
>> > +                       attribute.
>> > +
>> >  Characteristic Descriptors hierarchy
>> >  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> >
>> > @@ -284,6 +292,8 @@ Methods             array{byte} ReadValue(dict
> flags)
>> >                         Possible options: "offset": Start offset
>> >                                           "device": Device path (Serve=
r
> only)
>> >                                           "link": Link type (Server
> only)
>> > +                                         "authorize": boolean Is
> authorization
>> > +                                                      request
>> >
>> >                         Possible Errors: org.bluez.Error.Failed
>> >                                          org.bluez.Error.InProgress
>> > --
>> > 2.13.6
>> >
>> > --
>> > 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
>
>
>
>> --
>> Luiz Augusto von Dentz
>
> Grzegorz Ko=C5=82odziejczyk



--=20
Luiz Augusto von Dentz

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

* [PATCH BlueZ v2 3/5] doc/gatt-api: Add authorization options for attributes
  2018-05-16 13:52 [PATCH BlueZ v2 1/5] client: Add missing duplicated string free Grzegorz Kolodziejczyk
@ 2018-05-16 13:52 ` Grzegorz Kolodziejczyk
  0 siblings, 0 replies; 5+ messages in thread
From: Grzegorz Kolodziejczyk @ 2018-05-16 13:52 UTC (permalink / raw)
  To: linux-bluetooth

This patch adds authorization property for attributes and prepare write
request for authorization option for write request. This is require to
handle correctly prepare writes, which may response with insufficient
authorization error.
---
 doc/gatt-api.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/gatt-api.txt b/doc/gatt-api.txt
index 0f1cc9029..fc61838df 100644
--- a/doc/gatt-api.txt
+++ b/doc/gatt-api.txt
@@ -85,6 +85,8 @@ Methods		array{byte} ReadValue(dict options)
 			Possible options: "offset": Start offset
 					  "device": Device path (Server only)
 					  "link": Link type (Server only)
+					  "authorize": boolean Is prepare write
+							    authorization request
 
 			Possible Errors: org.bluez.Error.Failed
 					 org.bluez.Error.InProgress
@@ -251,6 +253,12 @@ Properties	string UUID [read-only]
 				"secure-read" (Server only)
 				"secure-write" (Server only)
 
+		boolean Authorize [read-only, optional] (Server only)
+
+			True, if authorization is required for attribute
+			operations. By default this valuie is set to false for
+			attribute.
+
 Characteristic Descriptors hierarchy
 ====================================
 
@@ -284,6 +292,8 @@ Methods		array{byte} ReadValue(dict flags)
 			Possible options: "offset": Start offset
 					  "device": Device path (Server only)
 					  "link": Link type (Server only)
+					  "authorize": boolean Is authorization
+						       request
 
 			Possible Errors: org.bluez.Error.Failed
 					 org.bluez.Error.InProgress
-- 
2.13.6


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

end of thread, other threads:[~2018-05-22  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16 13:55 [PATCH BlueZ v2 3/5] doc/gatt-api: Add authorization options for attributes Grzegorz Kolodziejczyk
2018-05-21  9:44 ` Luiz Augusto von Dentz
2018-05-22  7:33   ` Grzegorz Kołodziejczyk
2018-05-22  8:01     ` Luiz Augusto von Dentz
  -- strict thread matches above, loose matches on Subject: below --
2018-05-16 13:52 [PATCH BlueZ v2 1/5] client: Add missing duplicated string free Grzegorz Kolodziejczyk
2018-05-16 13:52 ` [PATCH BlueZ v2 3/5] doc/gatt-api: Add authorization options for attributes Grzegorz Kolodziejczyk

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.