linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Vijaykumar Dadmode <Vijaykumar.Dadmode@csr.com>
Cc: "Ganir, Chen" <chen.ganir@ti.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Subject: Re: Proposal for GATT Client Dbus API.
Date: Tue, 8 Nov 2011 15:56:53 +0200	[thread overview]
Message-ID: <CABBYNZ+k+Bra9pZuCcLo1jgpaerteOaAxZS8+eMt_ikT3uwb6A@mail.gmail.com> (raw)
In-Reply-To: <F82830D409D80E4881C83250E051B74B478529E4@banasiexm01.ASIA.ROOT.PRI>

Hi,

On Mon, Nov 7, 2011 at 3:35 PM, Vijaykumar Dadmode
<Vijaykumar.Dadmode@csr.com> wrote:
> Hi Chen,
> Below is the latest diff, with all the changes incorporated. Let me know your view.
>
> diff --git a/doc/attribute-api.txt b/doc/attribute-api.txt
> index 98d7f30..9dd8222 100644
> --- a/doc/attribute-api.txt
> +++ b/doc/attribute-api.txt
> @@ -110,6 +110,20 @@ Methods            dict GetProperties()
>                        read-write properties can be changed. On success
>                        this will emit a PropertyChanged signal.
>
> +               void GetCharacteristicValue(uint16 timeout)

The interface name already is org.bluez.Characteristic so we really
need Characteristic again.

> +                       Read the value of the characteristic with timeout value in seconds.
> +                       This will emit a ReadResponse signal with status code.

Why you don't return an error? Signals are not that great here, you
also want to track the caller so that if it exit you cancel the
operation.

> +               void SetCharacteristicValue(variant value, string method, uint16 offset, uint16 timeout)
> +
> +                       Changes the value of the specified characteristic as per the offset and method, with timeout value in seconds.
> +                       This will emit a WriteResponse signal with status code.
> +
> +                       Write the value of the characreristic, with any of these specified method:
> +                       "WriteWithResponse", "SignedWriteWithoutResponse",
> +                       "WriteLongCharacteristicValue", "PrepareWrite", "ExecuteWrite".
> +

Same here, signals are useful for async events not for response, also
you are mixing terminology of set/get with read/write, either use one
or the other.

>                        Possible Errors: org.bluez.Error.InvalidArguments
>
>  Properties     string UUID [readonly]
> @@ -126,7 +140,41 @@ Properties         string UUID [readonly]
>                        Textual optional characteristic descriptor describing
>                        the Characteristic Value.
>
> +               boolean Broadcast [readwrite]
> +
> +                       Indicates whether this characteristic is broadcasted or not.
> +                       If GATT Server Characteristic Configuration descriptor
> +                       is not available for this characteristic, or if the characteristic
> +                       properties do not allow this, writing to this property is not
> +                       allowed.
> +
> +               boolean Indicate [readwrite]
> +
> +                       Indicates whether this characteristic is notified or not.
> +                       If GATT Client Characteristic Configuration descriptor
> +                       is not available for this characteristic, or if the characteristic
> +                       properties do not allow this, writing to this property is not
> +                       allowed.
> +
> +               boolean Notify [readwrite]
> +
> +                       Indicates whether this characteristic is indicated or not.
> +                       If GATT Client Characteristic Configuration descriptor
> +                       is not available for this characteristic, or if the characteristic
> +                       properties do not allow this, writing to this property is not
> +                       allowed.
> +
> +               boolean Readable [readonly]
> +
> +                       Indicates wether this characteristic value can be read.
> +
> +               array{string} WriteMethods [readonly]
> +
> +                       Write methods supported by the characteristic, includes extended properties if defined, format defined by GATT spec.
> +                       Possible values:
> +                       { "WriteWithoutResponse", "Write", "AuthenticatedSignedWrite", "ReliableWrite", "WritableAuxiliaries"}
> +
>
> -               struct Format [readonly]
> +               array{struct} Format [readonly]
>
>                        Optional Characteristic descriptor which defines the
>                        format of the Characteristic Value. For numeric
> @@ -142,6 +190,11 @@ Properties         string UUID [readonly]
>                          uint16 | Description: Description of the characteristic defined
>                                 | in a high layer profile.
>
> +               array{object} CustomCharacteristicsDesc [readonly]
> +
> +                       This list contains the user defined characteristics descriptors owned by this
> +                       specific characteristics.
> +
>                array{byte} Value [readwrite]
>
>                        Raw value of the Characteristic Value attribute.
> @@ -162,3 +215,11 @@ Object path        freely definable
>  Methods                void ValueChanged(object characteristic, array{byte})
>
>                        New raw value of the Characteristic Value attribute.
> +
> +               void ReadResponse(object characteristic, uint8 status, variant value)
> +
> +                       Value read and status code for Read Characteristic Value attribute operation.
> +
> +               void WriteResponse(object characteristic, uint8 status)
> +
> +                       Status code for Write Characteristic Value attribute opeartion.



-- 
Luiz Augusto von Dentz

      parent reply	other threads:[~2011-11-08 13:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AcyCnA5DqBiEIGAzQEqnbRbpdBNd8AAAHtNw>
2011-10-04 13:59 ` Proposal for GATT Client Dbus API Vijaykumar Dadmode
2011-10-13 18:27   ` Claudio Takahasi
2011-10-14 11:51     ` Vijaykumar Dadmode
2011-10-14 12:19       ` Anderson Lizardo
2011-10-14 13:13   ` Anderson Lizardo
2011-10-18 11:02     ` Vijaykumar Dadmode
2011-11-03 10:32       ` Vijaykumar Dadmode
2011-11-03 12:21         ` Ganir, Chen
2011-11-04 12:45           ` Vijaykumar Dadmode
2011-11-06  7:55             ` Ganir, Chen
2011-11-07  9:19               ` Vijaykumar Dadmode
2011-11-07 11:00                 ` Ganir, Chen
2011-11-29  6:19                 ` Test Management interface for LE with latest kernel Vijaykumar Dadmode
2011-11-07 13:35               ` Proposal for GATT Client Dbus API Vijaykumar Dadmode
2011-11-07 13:52                 ` Ganir, Chen
2011-11-08 13:52                   ` Vijaykumar Dadmode
2011-11-08 13:56                 ` Luiz Augusto von Dentz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABBYNZ+k+Bra9pZuCcLo1jgpaerteOaAxZS8+eMt_ikT3uwb6A@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=Vijaykumar.Dadmode@csr.com \
    --cc=chen.ganir@ti.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).