GATT database hash + persistent caching#1685
Closed
gmarull wants to merge 3 commits into
Closed
Conversation
Pull NimBLE support for the GATT Database Hash characteristic (0x2B2A, Core spec v5.4, Vol 3, Part G, 7.3.1) and enable BLE_GATT_CACHING for both SoC targets, in the generated syscfg headers and in the syscfg generation project. Clients that cache the attribute database (notably iOS and Android) can now detect database changes across firmware updates deterministically by reading the hash on reconnection, instead of relying only on Service Changed indications. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add storage for the GATT caching peer state table (an opaque driver-defined blob) and the local GATT database hash, stored as singleton records in the bonding settings file. PRF does not persist either, matching its CCCD storage stubs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Pull NimBLE support for server-side GATT robust caching (Vol 3, Part G, 2.5.2.1) and handle the new store object types in the NimBLE store glue. Per-bonded-peer Client Supported Features and change-aware state are kept in a RAM list, serialized as a fixed-layout blob into the new GATT caching persistent storage record, and lazily loaded on first access. Storage I/O happens outside the store mutex, since bt_persistent_storage holds its own lock while registering records back into this store. The database hash is read and written through storage directly. With this, a bonded phone that enabled robust caching gets a Database Out Of Sync ATT error when it operates on stale attribute handles after a firmware update changed the GATT database, instead of silently misbehaving, and its awareness state survives reboots on both sides. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.