CAF: Bluetooth state power manager module

The Bluetooth® state power manager module is a minor module that counts the number of active Bluetooth® connections and imposes a power manager module power level restriction if there is at least one active connection.

Configuration

The module is enabled by selecting CONFIG_CAF_BLE_STATE_PM. It depends on CONFIG_CAF_BLE_STATE and CONFIG_CAF_POWER_MANAGER.

Implementation details

The module reacts only to ble_peer_event. Upon the reception of the event, the module checks if the Bluetooth® peer is connected or disconnected. It then counts the active connections.

Depending on the count result:

  • If there is at least one active connection, the power level is limited to POWER_MANAGER_LEVEL_SUSPENDED.

  • If there is no active connection, the limitation on power level is removed.

For more information about the CAF power levels, see the CAF: Power manager module documentation page.