Add Advertising Coding Selection (Bluetooth 5.4) - #211
Merged
Conversation
- Add HCILESetExtendedAdvertisingParametersV2 (opcode 0x007F) with the Primary/Secondary_Advertising_PHY_Options parameters for expressing S=2/S=8 coding preferences on the LE Coded PHY, plus a host controller convenience method. - Allow the LE Coded S=2 value (0x04) in the extended advertising report Primary_PHY and Secondary_PHY fields. - Add the missing 5.1-5.4 link layer feature bits (17-44) to LowEnergyFeature, including Advertising Coding Selection (40/41) and Periodic Advertising with Responses (43/44). - Fix HCILESetExtendedAdvertisingParameters being bound to the setAdvertisingSetRandomAddress opcode (0x0035) instead of setExtendedAdvertisingParameters (0x0036).
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 3 of Bluetooth Core 5.4 support: Advertising Coding Selection (CSSA), plus the missing 5.1–5.3 link layer feature bits and another wrong-opcode fix found along the way.
What changed
HCILESetExtendedAdvertisingParametersV2(opcode0x007F) — composes the v1 parameters and appends the newPrimary_Advertising_PHY_Options/Secondary_Advertising_PHY_Optionsoctets (noPreference/preferS2/preferS8/requireS2/requireS8), with return parameter and asetExtendedAdvertisingParametersV2convenience method.PrimaryPHY/SecondaryPHYnow accept0x04(LE Coded, S=2);0x03documented as S=8 under CSSA.LowEnergyFeature— added all missing feature bits 17–44 (CTE, PAST, SCA, CIS/ISO, power control, path loss, subrating, channel classification, CSSA 40/41, DBAF 42, PAwR 43/44) withallCasesand name-table entries. Bit numbers verified against Zephyr'shci_types.h.HCILESetExtendedAdvertisingParameters.commandwas bound to.setAdvertisingSetRandomAddress(0x0035) instead of.setExtendedAdvertisingParameters(0x0036) — same defect class as thesetDefaultPhyfix in Fix Set Default PHY opcode and implement Set Event Filter #208. The v1 command struct sent the wrong opcode; regression test added.Notes for review
isValid(valid Controller-to-Controller) flags for the new feature bits follow the Vol 6 Part B Table 4.4 pattern (connection procedures = Y; advertising/broadcast/host-support = N) — worth double-checking against the spec table.fatalErrorotherwise).Full suite: 285 tests pass; lint clean.