-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Bluetooth: Classic: Gap: add link mode policy handle code #83350
base: main
Are you sure you want to change the base?
Conversation
@jhedberg In our Bluetooth service, there is a power manager module similar to Android that uses these interfaces power_manager.c |
By the way, general classic Bluetooth products such as headphones use these interfaces to manage SOC power consumption. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is recommended to add a kConfig to control this feature.
36bc2cd
to
d1ab728
Compare
cp->handle = sys_cpu_to_le16(conn->handle); | ||
cp->max_interval = sys_cpu_to_le16(max_interval); | ||
cp->min_interval = sys_cpu_to_le16(min_interval); | ||
cp->attempt = sys_cpu_to_le16(attempt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The range of attempt
is 1 to Tsniff÷2. I think the range of attempt
also need to be checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tsniff(interval) is a negotiation results, here given a suggestion range from 1~0x1F3, some platform attempt is a fixed value 2 or 4.
How to deal with this more reasonably.
Add bt_conn_enter_sniff_mode/bt_conn_exit_sniff_mode api control the sniff mode, handle BT_HCI_EVT_MODE_CHANGE event to notify the host that the mode has been changed and link_mode_changed callback to notify application. Signed-off-by: fangzhenwei <[email protected]>
d1ab728
to
fdc19ca
Compare
Add bt_conn_enter_sniff_mode/bt_conn_exit_sniff_mode api control the sniff mode, handle BT_HCI_EVT_MODE_CHANGE event to notify the host that the mode has been changed and link_mode_changed callback to notify application.