Add Bluetooth 5.4 GAP advertising data types - #210
Merged
Conversation
Add Encrypted Advertising Data (0x31) and Periodic Advertising Response Timing Information (0x32) GAP types, and fill in the missing 5.1-5.3 AD type constants (BIGInfo, Broadcast_Code, Resolvable Set Identifier, Advertising Interval - long, Broadcast_Name, Electronic Shelf Label). The Encrypted Advertising Data type carries the raw randomizer, ciphertext, and MIC fields; CCM encryption is out of scope.
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.
Phase 2 of Bluetooth Core 5.4 support: the advertising-data layer.
What changed
GAPEncryptedAdvertisingData<Payload>(AD type0x31) — carries the 5-octet Randomizer, opaque encrypted payload, and 4-octet MIC of the Encrypted Advertising Data feature. Generic over the payload container likeGAPManufacturerSpecificData. CCM encryption/decryption is intentionally out of scope (no crypto dependency); the type exposes the raw fields for consumers. Registered inGAPDataDecoder.defaultTypes.GAPPeriodicAdvertisingResponseTimingInformation(AD type0x32) — the PAwR synchronization info carried in the ACAD field ofAUX_ADV_IND: response access address, number of subevents, subevent interval (×1.25 ms), response slot delay (×1.25 ms), and response slot spacing (×0.125 ms).GAPDataTypegap fill — added the missing 5.1–5.4 assigned AD type constants betweenmeshBeacon(0x2B) andinformationData3D(0x3D): BIGInfo (0x2C), Broadcast_Code (0x2D), Resolvable Set Identifier (0x2E), Advertising Interval - long (0x2F), Broadcast_Name (0x30), and Electronic Shelf Label (0x34), with name-table entries. Values verified against the Bluetooth SIG assigned-numbers repository.Tests
Decode/encode tests with byte-exact vectors, length-validation rejection cases, and generic-container round trips. Full suite: 281 tests pass; no new lint warnings.