Skip to content

Conversation

chengkai15
Copy link
Contributor

@chengkai15 chengkai15 commented Sep 26, 2025

This PR adds support for configuring BR/EDR page scan and inquiry scan parameters, and Class of Device (COD) features.

Changes

  1. Page Scan Parameters:

    • Add bt_br_page_scan_update_param API to update page scan interval, window, and type (standard or interlaced).
    • Predefined parameter sets for different Bluetooth versions (R0, R1, R2) are provided.
  2. Inquiry Scan Parameters:

    • Add bt_br_inquiry_scan_update_param API to update inquiry scan interval, window, and type.
    • Default parameter set is provided.
  3. Class of Device (COD):

    • Add APIs to set and get COD from the controller.
  4. Shell Commands:

    • Add pscan-param shell command for testing page scan parameters.
    • Add iscan-param shell command for testing inquiry scan parameters.

Testing

  • Tested using the Bluetooth shell with various parameter sets and custom parameters.
  • Verified that the page scan and inquiry scan parameters are correctly set in the controller.
  • Verified COD set and get functionality.

Notes

These features are essential for optimizing Bluetooth classic device discoverability and connectivity, and for correctly advertising the device class.

@HaavardRei HaavardRei removed their request for review September 30, 2025 13:13
@cvinayak cvinayak removed their request for review October 15, 2025 06:42
@chengkai15 chengkai15 force-pushed the dev_scan_params branch 3 times, most recently from 377c0de to 91ecda9 Compare October 20, 2025 13:28
Copy link
Member

@jhedberg jhedberg left a comment

Choose a reason for hiding this comment

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

@chengkai15 there's a "t" missing from the title of your second commit. Also, I'd recommend to familiarize yourself with https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-message-body and see if you think your commit messages need some improving :)

gzh-terry
gzh-terry previously approved these changes Oct 21, 2025
Copy link
Contributor

@gzh-terry gzh-terry left a comment

Choose a reason for hiding this comment

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

Generally looks fine to me, but pay attention to code styles.

This commit implements Class of Device (COD) functionality for
Classic Bluetooth, supporting both setting and retrieving COD
from the controller by bt_br_write_cod and bt_br_read_cod.

Signed-off-by: Kai Cheng <[email protected]>
This commit implements Class of Device (COD) test shell
functionality for Classic Bluetooth, supporting both
setting and retrieving COD from the controller.

Signed-off-by: Kai Cheng <[email protected]>
Implement BR/EDR page scan parameters update functionality with new
API bt_br_page_scan_update_param(). Adds support for setting page scan
interval, window and type (standard/interlaced) via HCI commands.
Includes predefined parameter sets for different Bluetooth versions
and use cases.

Signed-off-by: Kai Cheng <[email protected]>
gzh-terry
gzh-terry previously approved these changes Oct 21, 2025
Add shell command for testing BR/EDR page scan parameters update.
Supports predefined parameter sets (R0, R1, R2 variants) and custom
parameters via interval/window/type arguments.

Signed-off-by: Kai Cheng <[email protected]>
Implement BR/EDR inquiry scan parameters update functionality with
new API bt_br_inquiry_scan_update_param(). Adds support for setting
inquiry scan interval, window and type via HCI commands. Includes
default parameter set for standard inquiry scanning.

Signed-off-by: Kai Cheng <[email protected]>
Add shell command for testing BR/EDR inquiry scan parameters update.
Supports default parameter set and custom parameters via interval/
window/type arguments for inquiry scan configuration.

Signed-off-by: Kai Cheng <[email protected]>
@chengkai15 chengkai15 changed the title Bluetooth: Classic: add page/inquiry scan params and cod Bluetooth: Classic: add page/inquiry scan params and cod feature Oct 21, 2025
@sonarqubecloud
Copy link

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

Labels

area: Bluetooth Classic Bluetooth Classic (BR/EDR) area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants