You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
caf: modules: ble_adv: Power down on disconnection with reason 0x15
Force power down if bonded peer disconnects with reason 0x15 (Remote
Device Terminated due to Power Off).
Jira: NCSDK-24458
Signed-off-by: Marek Pieta <[email protected]>
Signed-off-by: Pekka Niskanen <[email protected]>
Signed-off-by: Divya Pillai <[email protected]>
@@ -98,6 +99,17 @@ This is done to ensure that the user does not try to connect to the device that
98
99
99
100
The :kconfig:option:`CONFIG_CAF_BLE_ADV_GRACE_PERIOD` is enabled by default if the Swift Pair advertising data provider is enabled in the configuration.
100
101
102
+
Force power down on bonded peer power off
103
+
-----------------------------------------
104
+
105
+
You can use the :kconfig:option:`CONFIG_CAF_BLE_ADV_POWER_DOWN_ON_DISCONNECTION_REASON_0X15` Kconfig option to force power down when a bonded peer disconnects with reason ``0x15`` (Remote Device Terminated due to Power Off).
106
+
On a Bluetooth LE peer event (:c:struct:`ble_peer_event`) reporting :c:enumerator:`PEER_STATE_DISCONNECTED` (:c:member:`ble_peer_event.state`) with reason ``0x15`` (:c:member:`ble_peer_event.reason`), the module performs the following:
107
+
108
+
* Instantly stops Bluetooth LE advertising (the module enters power down state).
109
+
* Submits a force power down event (:c:struct:`force_power_down_event`).
110
+
111
+
You can use this feature to prevent a bonded peer from waking up until activity on the peripheral is detected.
112
+
101
113
Implementation details
102
114
**********************
103
115
@@ -127,7 +139,7 @@ The Bluetooth LE bond module broadcasts information related to bond control usin
127
139
The |ble_adv| reacts on :c:struct:`ble_peer_operation_event` related to the Bluetooth peer change or erase advertising.
128
140
The module performs one of the following operations:
129
141
130
-
* If there is a peer connected over Bluetooth, the |ble_adv| triggers disconnection and submits a :c:struct:`ble_peer_event` with :c:member:`ble_peer_event.state` set to :c:enum:`PEER_STATE_DISCONNECTING` to let other application modules prepare for the planned disconnection.
142
+
* If there is a peer connected over Bluetooth, the |ble_adv| triggers disconnection and submits a :c:struct:`ble_peer_event` with :c:member:`ble_peer_event.state` set to :c:enumerator:`PEER_STATE_DISCONNECTING` to let other application modules prepare for the planned disconnection.
131
143
* Otherwise, the Bluetooth advertising with the newly selected Bluetooth local identity is started.
132
144
133
145
Avoiding connection requests from unbonded centrals when bonded
0 commit comments