* [PATCH 0/1] Add enc_read_blob_req() API to ATT
@ 2010-12-14 19:50 Brian Gix
2010-12-14 19:50 ` [PATCH] Added enc_read_blob_req() API to ATT transport, to enable the reading of attributes that exceed the length of the MTU Brian Gix
2010-12-14 19:54 ` [PATCH 0/1] Add enc_read_blob_req() API to ATT Brian Gix
0 siblings, 2 replies; 5+ messages in thread
From: Brian Gix @ 2010-12-14 19:50 UTC (permalink / raw)
To: linux-bluetooth; +Cc: padovan, rshaffer
Atomic change to add ATT_OP_READ_BLOB_REQ encoing to ATT. No dependancies.
--
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Added enc_read_blob_req() API to ATT transport, to enable the reading of attributes that exceed the length of the MTU.
2010-12-14 19:50 [PATCH 0/1] Add enc_read_blob_req() API to ATT Brian Gix
@ 2010-12-14 19:50 ` Brian Gix
2010-12-14 20:29 ` Anderson Lizardo
2010-12-14 19:54 ` [PATCH 0/1] Add enc_read_blob_req() API to ATT Brian Gix
1 sibling, 1 reply; 5+ messages in thread
From: Brian Gix @ 2010-12-14 19:50 UTC (permalink / raw)
To: linux-bluetooth; +Cc: padovan, rshaffer, Brian Gix
--
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
---
attrib/att.c | 19 +++++++++++++++++++
attrib/att.h | 2 ++
2 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/attrib/att.c b/attrib/att.c
index 445b192..f8dbc02 100644
--- a/attrib/att.c
+++ b/attrib/att.c
@@ -542,6 +542,25 @@ uint16_t enc_read_req(uint16_t handle, uint8_t *pdu, int len)
return min_len;
}
+uint16_t enc_read_blob_req(uint16_t handle, uint16_t offset, uint8_t *pdu,
+ int len)
+{
+ const uint16_t min_len = sizeof(pdu[0]) + sizeof(handle) +
+ sizeof(offset);
+
+ if (pdu == NULL)
+ return 0;
+
+ if (len < min_len)
+ return 0;
+
+ pdu[0] = ATT_OP_READ_BLOB_REQ;
+ att_put_u16(handle, &pdu[1]);
+ att_put_u16(offset, &pdu[3]);
+
+ return min_len;
+}
+
uint16_t dec_read_req(const uint8_t *pdu, int len, uint16_t *handle)
{
const uint16_t min_len = sizeof(pdu[0]) + sizeof(*handle);
diff --git a/attrib/att.h b/attrib/att.h
index 2c8c724..0b8612e 100644
--- a/attrib/att.h
+++ b/attrib/att.h
@@ -202,6 +202,8 @@ uint16_t enc_write_req(uint16_t handle, const uint8_t *value, int vlen,
uint16_t dec_write_req(const uint8_t *pdu, int len, uint16_t *handle,
uint8_t *value, int *vlen);
uint16_t enc_read_req(uint16_t handle, uint8_t *pdu, int len);
+uint16_t enc_read_blob_req(uint16_t handle, uint16_t offset, uint8_t *pdu,
+ int len);
uint16_t dec_read_req(const uint8_t *pdu, int len, uint16_t *handle);
uint16_t enc_read_resp(uint8_t *value, int vlen, uint8_t *pdu, int len);
uint16_t dec_read_resp(const uint8_t *pdu, int len, uint8_t *value, int *vlen);
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1] Add enc_read_blob_req() API to ATT
2010-12-14 19:50 [PATCH 0/1] Add enc_read_blob_req() API to ATT Brian Gix
2010-12-14 19:50 ` [PATCH] Added enc_read_blob_req() API to ATT transport, to enable the reading of attributes that exceed the length of the MTU Brian Gix
@ 2010-12-14 19:54 ` Brian Gix
1 sibling, 0 replies; 5+ messages in thread
From: Brian Gix @ 2010-12-14 19:54 UTC (permalink / raw)
To: linux-bluetooth; +Cc: padovan, rshaffer
Hi Gustavo, Vinicius,
On 12/14/2010 11:50 AM, Brian Gix wrote:
> Atomic change to add ATT_OP_READ_BLOB_REQ encoing to ATT. No dependancies.
>
>
This patch contains only the stand-alone ATT changes, and corrects the
ws issue identified by Vinicius.
--
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Added enc_read_blob_req() API to ATT transport, to enable the reading of attributes that exceed the length of the MTU.
2010-12-14 19:50 ` [PATCH] Added enc_read_blob_req() API to ATT transport, to enable the reading of attributes that exceed the length of the MTU Brian Gix
@ 2010-12-14 20:29 ` Anderson Lizardo
2010-12-16 3:03 ` Anderson Lizardo
0 siblings, 1 reply; 5+ messages in thread
From: Anderson Lizardo @ 2010-12-14 20:29 UTC (permalink / raw)
To: Brian Gix; +Cc: linux-bluetooth, padovan, rshaffer
On Tue, Dec 14, 2010 at 3:50 PM, Brian Gix <bgix@codeaurora.org> wrote:
> --
> Brian Gix
> bgix@codeaurora.org
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
>
> ---
> attrib/att.c | 19 +++++++++++++++++++
> attrib/att.h | 2 ++
> 2 files changed, 21 insertions(+), 0 deletions(-)
Usually, patches sent do Bluez, starte with short commit messages like:
Add ...
Fix ...
Implement ...
Note that we don't use "Added", "Fixed" etc. See the git log for
reference. In this case, you should consider at least adding a short
summary and your original summary as the "commit description", in the
form:
<short summary, e.g. "Implement Read Blob Request">
<empty line>
<long description>
Also as Vinicius mentioned, I think your e-mail signature will show up
on the commit description if someone applies it with "git am". I
suggest you send your patches with "git send-email".
Another issue: looks your e-mail client replaced tabs with spaces (but
it might just be Google messing up on my side).
Regards,
--
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Added enc_read_blob_req() API to ATT transport, to enable the reading of attributes that exceed the length of the MTU.
2010-12-14 20:29 ` Anderson Lizardo
@ 2010-12-16 3:03 ` Anderson Lizardo
0 siblings, 0 replies; 5+ messages in thread
From: Anderson Lizardo @ 2010-12-16 3:03 UTC (permalink / raw)
To: Brian Gix; +Cc: linux-bluetooth, padovan, rshaffer
On Tue, Dec 14, 2010 at 4:29 PM, Anderson Lizardo
<anderson.lizardo@openbossa.org> wrote:
> Another issue: looks your e-mail client replaced tabs with spaces (but
> it might just be Google messing up on my side).
BTW just checked and indeed it was just bad formatting by gmail
webmail (from my side). The tabs on your patch are correct. The other
comments I still think are valid.
Regards,
--
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-16 3:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14 19:50 [PATCH 0/1] Add enc_read_blob_req() API to ATT Brian Gix
2010-12-14 19:50 ` [PATCH] Added enc_read_blob_req() API to ATT transport, to enable the reading of attributes that exceed the length of the MTU Brian Gix
2010-12-14 20:29 ` Anderson Lizardo
2010-12-16 3:03 ` Anderson Lizardo
2010-12-14 19:54 ` [PATCH 0/1] Add enc_read_blob_req() API to ATT Brian Gix
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).