From: Brian Gix <bgix@codeaurora.org>
To: unlisted-recipients:; (no To-header on input)
Cc: rshaffer@codeaurora.org, padovan@profusion.mobi,
linux-bluetooth@vger.kernel.org
Subject: [RFC 0/1] Implement Compound (Multi-step) GATT Procedure Support
Date: Fri, 17 Dec 2010 14:48:50 -0800 [thread overview]
Message-ID: <1292626132-30029-1-git-send-email-bgix@codeaurora.org> (raw)
The following two proposed patches implement a method for correctly
staging GATT procedures that require multiple ATT req/resp exchanges.
The first RFC / PATCH is gattrib.[ch], which allows the caller to specify
a gboolean indicating that the command being queued is Compound
(even if the procedure ends up being single/atomic) and a queue ID
number, which allows the caller to cancel the GATT procedure at any
stage of the transaction.
IF -
The ATT opcode being queued is specified as compound, the resulting response
will not cause the next item in the queue to be sent until *after* the
response has been forwarded to the caller via the response callback.
IF -
The ATT opcode being queued is *not* compound, the resulting response
will service the pkt queue immediately (legacy functionality).
IF -
The ID passed to g_attrib_send_seq is ZERO, the command pkt will
be added to the TAIL of the queue, and a new ID assigned to it.
(Legacy functionality)
IF -
The ID passed to g_attrib_send_seq is NON-ZERO, the command pkt
will be added to the HEAD of the queue, causing it to be the next
pkt sent to the remote device. The NON-ZERO ID is also then able
to cancel the command.
The second RFC / PATCH is to gatt.c. It modifies the existing gatt_read_char()
function to recognize the need for a compound Read procedure, and implements
it as a READ_REQ + READ_BLOB_REQ + READ_BLOB_REQ ...<etc> as needed, using
the g_attrib_send_seq() logic from the first RFC / PATCH.
--
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next reply other threads:[~2010-12-17 22:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 22:48 Brian Gix [this message]
2010-12-17 22:48 ` [RFC 1/2] Add g_attrib_send_seq() Brian Gix
2010-12-22 22:29 ` Claudio Takahasi
2010-12-22 23:13 ` Brian Gix
2010-12-28 21:48 ` Vinicius Costa Gomes
2011-01-05 1:07 ` bgix
2011-01-05 22:27 ` Brian Gix
2010-12-17 22:48 ` [RFC 2/2] Fix gatt_read_char() to work with long attributes Brian Gix
2010-12-21 17:25 ` [RFC 0/1] Implement Compound (Multi-step) GATT Procedure Support Brian Gix
2010-12-21 19:25 ` Claudio Takahasi
2010-12-21 19:50 ` Brian Gix
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=1292626132-30029-1-git-send-email-bgix@codeaurora.org \
--to=bgix@codeaurora.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=padovan@profusion.mobi \
--cc=rshaffer@codeaurora.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 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.