Bluetooth LE advertising module

In nRF Desktop, the Bluetooth LE advertising module is responsible for controlling the Bluetooth LE advertising for the nRF Desktop peripheral device.

Module events

Source Module

Input Event

This Module

Output Event

Sink Module

Bluetooth LE advertising module

ble_peer_event

ble_adv

Bluetooth LE state module

Bluetooth LE bond module

ble_peer_operation_event

Source modules for module_state_event

module_state_event

Power manager module

power_down_event

Bluetooth LE advertising module

wake_up_event

Buttons module

HID forward module

Motion module

Power manager module

Wheel module

ble_peer_event

Sink modules for ble_peer_event

ble_peer_search_event

LED state module

force_power_down_event

Power manager module

module_state_event

Sink modules for module_state_event

wake_up_event

Sink modules for wake_up_event

Note

See the Application overview for more information about the event-based communication in the nRF Desktop application and about how to read this table.

Configuration

nRF Desktop uses the Bluetooth LE advertising module from Common Application Framework (CAF). The CONFIG_DESKTOP_BLE_ADV Kconfig option selects CONFIG_CAF_BLE_ADV and aligns the default module configuration to the application requirements. For details on the default configuration alignment, see the following sections.

For more information about Bluetooth configuration in nRF Desktop, see nRF Desktop: Bluetooth.

Avoiding connection requests from unbonded centrals when bonded

If the Bluetooth local identity currently in use already has a bond and the nRF Desktop device uses indirect advertising, the device will not set the General Discoverable flag. The nRF Desktop devices also enable CONFIG_CAF_BLE_ADV_FILTER_ACCEPT_LIST to filter incoming scan response data requests and connection requests. This is done to prevent Bluetooth Centrals other than the bonded one from connecting with the device. The nRF Desktop dongle scans for peripheral devices using the Bluetooth device name, which is provided in the scan response data.

Advertised data

The CAF: Bluetooth LE advertising module relies on Bluetooth LE advertising providers to manage advertising data and scan response data. nRF Desktop application configures the data providers in src/modules/Kconfig.caf_ble_adv.default. By default, the application enables a set of data providers available in the nRF Connect SDK and adds a custom provider of UUID16 values of Battery Service (BAS) and Human Interface Device Service (HIDS). The UUID16 of a given GATT Service is added to the advertising data only if the service is enabled in the configuration and the Bluetooth local identity in use has no bond.

Implementation details

See the CAF Bluetooth LE advertising page for implementation details.