-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Bluetooth: Classic: add power mode control with sniff mode #96607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
jhedberg
requested changes
Sep 26, 2025
0aa6e28 to
e89f528
Compare
gzh-terry
reviewed
Sep 28, 2025
gzh-terry
previously approved these changes
Oct 21, 2025
|
@chengkai15 please fix the typo in the commit message title (s/Blueototh/Bluetooth/) |
jhedberg
requested changes
Oct 21, 2025
gzh-terry
previously approved these changes
Oct 22, 2025
gzh-terry
reviewed
Oct 22, 2025
gzh-terry
reviewed
Oct 22, 2025
gzh-terry
reviewed
Oct 22, 2025
Implement BR/EDR power mode control with sniff mode functionality. Adds APIs bt_conn_br_enter_sniff_mode() and bt_conn_br_exit_sniff_mode() to manage power saving modes. Includes parameter validation and HCI command handling for sniff mode configuration with min/max intervals, attempt count, and timeout parameters. Signed-off-by: Kai Cheng <[email protected]>
Implement mode change event handling and callback notification for BR/EDR power mode transitions. Adds br_mode_changed callback to notify applications when connection switches between active and sniff modes. Handles HCI mode change events and propagates mode and interval information to registered callbacks. Signed-off-by: Kai Cheng <[email protected]>
Add shell command for testing BR/EDR power mode control. Supports entering sniff mode with configurable parameters (min/max interval, attempt, timeout) and exiting back to active mode. Provides real-time feedback on mode change requests and status. Signed-off-by: Kai Cheng <[email protected]>
|
gzh-terry
approved these changes
Oct 22, 2025
jhedberg
approved these changes
Oct 22, 2025
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
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.



Bluetooth: Classic: add power mode control with sniff mode
Summary
This PR implements power mode control for Bluetooth Classic connections, adding support for sniff mode to enable power saving while maintaining connectivity. The feature includes comprehensive APIs, event handling, and shell commands for testing and configuration.
Changes
bt_conn_br_enter_sniff_mode()andbt_conn_br_exit_sniff_mode()APIs with parameter validationbr_mode_changedcallback for application notificationset_sniff_modeshell command for testing power mode transitionsCONFIG_BT_POWER_MODE_CONTROLKconfig option to enable the featureTechnical Details
Features
Testing
Impact
This power mode control feature is essential for battery-powered Bluetooth Classic devices requiring optimized power consumption while maintaining reliable connections.