Skip to content

Add READ_BLOB support to attrib-server

Brian Gix linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Fix default GATT/ATT MTU sizesattrib/att.h attrib/gatt.c src/attrib-server.c+21 -161 reply
2/3Fix Handle range if Pri/Sec Service is Emptysrc/attrib-server.c+1 -01 reply
3/3Add READ_BLOB_REQUEST support to attribute serverattrib/att.c attrib/att.h src/attrib-server.c+86 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Add READ_BLOB support to attrib-server

The following patches were cretated off of the working bluez tip at git.kernel.org as of:

commit f0411254277e6c2273d32379e4a2d3742ee05e55

Author: Johan Hedberg <[email protected]>
Date:   Wed Jan 19 22:20:41 2011 +0530

Update NREC callback code to originally intended v2 state

Patch 1 adds the default MTU for L2CAP based ATT connections (48) and modifies the usages for consistency. This is important when segmenting long attribute over multiple transactions, because remote clients will typically decide wether to issue subsequent READ_BLOB request based on wether the prior read filled the entire MTU. This explicitely does not address situations where a larger MTU than the defaults (23 and 48) are used, but in practice, there is no evidence that they exist at this time.

Patch 2 is some maintanence to fix the attrib-server to correctly indicate the end of the service range, if a primary or secondary service contains nothing but the service declaration. This can be seen prior to this patch in attrib-server.c in the GATT_PRIM_SVC_UUID definition which sent a service range of 0x0010 - 0x0006 instead of 0x0010 - 0x0010.

Patch 3 completes the implementation. It can be tested on the current example server by reading attribute 0x0214, which caontains a 25 octet string.

Signature · 4 lines
Brian Gix
[email protected]
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum