Skip to content

Update HCI types to Bluetooth Core Spec 6.3#75

Open
J0hannes101 wants to merge 8 commits into
embassy-rs:mainfrom
J0hannes101:6.3
Open

Update HCI types to Bluetooth Core Spec 6.3#75
J0hannes101 wants to merge 8 commits into
embassy-rs:mainfrom
J0hannes101:6.3

Conversation

@J0hannes101
Copy link
Copy Markdown
Contributor

@J0hannes101 J0hannes101 commented May 10, 2026

Changes made:

  • Added LmpFeatureMaskPage1/2 and LeFeatureMaskPage1 for extended feature pages
  • Added ExtendedLmpFeatures struct with as_page_0/1/2() methods for viewing features by page
  • Updated ReadRemoteExtendedFeaturesComplete event to use the new ExtendedLmpFeatures type
  • Updated feature masks, event masks, command masks, and error codes to spec 6.3
  • Change doc comment ordering in param! macro

@J0hannes101 J0hannes101 changed the title 6.3 Update HCI types to Bluetooth Core Spec 6.3 May 10, 2026
Comment on lines -105 to +163
(41, supports_adv_coding_selection_host_support, set_adv_coding_selection_host_support);
(41, supports_adv_coding_selection_host, set_adv_coding_selection_host);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid unnecessary API changes.

Comment on lines +4 to +7
/// Extended LMP features that can be viewed as different page types.
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct ExtendedLmpFeatures([u8; 8]);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loses type safety by reinterpreting bytes as different values. ReadRemoteExtendedFeaturesComplete needs to provide an API that returns the correct LmpFeaturesMaskPage based on the page_number. An enum would be appropriate for modelling this. You may need to use a custom FromHciBytes implementation instead of using the macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants