Fast Pair module
The Fast Pair module is used to:
Update the Fast Pair advertising payload to automatically switch between showing and hiding user interface (UI) pairing indication on the Fast Pair Seeker. The UI indication must be displayed only if the Provider can bond with new peers on the currently used Bluetooth local identity.
Reject a normal Bluetooth pairing when outside of the pairing mode.
Remove the Fast Pair advertising payload for the dongle peer.
The module is used when integrating Google Fast Pair to nRF Desktop application. See Fast Pair section of the nRF Desktop documentation for detailed information about Fast Pair integration in the application.
Module events
Source Module |
Input Event |
This Module |
Output Event |
Sink Module |
---|---|---|---|---|
|
|
|||
|
||||
|
||||
|
||||
|
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
The Fast Pair module requires enabling the following Kconfig options:
CONFIG_BT_ADV_PROV_FAST_PAIR
- The nRF Desktop’s Bluetooth LE advertising module uses Bluetooth LE advertising providers to generate advertising and scan response data. The Google Fast Pair advertising data provider (CONFIG_BT_ADV_PROV_FAST_PAIR
) is used to add the Fast Pair payload to the advertising data. The Fast Pair module uses API of the Google Fast Pair advertising data provider to switch between showing and hiding the UI indication. The UI indication is displayed only if the Provider can bond with new peers on the currently used Bluetooth local identity. The Provider supports up toCONFIG_CAF_BLE_STATE_MAX_LOCAL_ID_BONDS
bonds per Bluetooth local identity.CONFIG_CAF_BLE_COMMON_EVENTS
- The module updates the Fast Pair advertising payload reacting on the application events related to Bluetooth. See nRF Desktop: Bluetooth for Bluetooth configuration in the nRF Desktop.
The Fast Pair module is enabled using CONFIG_DESKTOP_FAST_PAIR Kconfig option.
The option is enabled by default if CONFIG_CAF_BLE_STATE_MAX_LOCAL_ID_BONDS
Kconfig option value is greater than one.
Note
If CONFIG_CAF_BLE_STATE_MAX_LOCAL_ID_BONDS
Kconfig option value is equal to one:
Displaying UI indication during the Fast Pair not discoverable advertising (
CONFIG_BT_ADV_PROV_FAST_PAIR_SHOW_UI_PAIRING
) is disabled by default in the nRF Desktop advertising data configuration defined insrc/util/Kconfig
file.Bluetooth LE state module automatically disconnects new peers right after Bluetooth connection is established if the used Bluetooth local identity is already bonded with another peer.
The CONFIG_DESKTOP_FAST_PAIR_LIMIT_NORMAL_PAIRING can be used to allow normal Bluetooth pairing only in the pairing mode. Normal Bluetooth pairing is rejected when outside of the pairing mode (if the used Bluetooth local identity already has a bonded peer). The option is enabled by default.
With the dongle peer functionality enabled (CONFIG_DESKTOP_BLE_DONGLE_PEER_ENABLE), the Fast Pair module selects the CONFIG_DESKTOP_BLE_DONGLE_PEER_ID_INFO option to track the application identity of the dongle peer.
Implementation details
The module is an early subscriber for ble_peer_event
and ble_peer_operation_event
.
This allows the module to update the Fast Pair advertising payload just before the Bluetooth advertising is started.
The module is a subscriber for ble_dongle_peer_event
.
This allows the module to remove the Fast Pair advertising payload when the application identity of the dongle peer is used.
The module registers the global application’s Bluetooth authentication callbacks (bt_conn_auth_cb
) and enables the Google Fast Pair Service (GFPS) (bt_fast_pair_enable()
) after CAF: Settings loader module loads Zephyr’s Settings.
The callbacks are used to reject normal Bluetooth pairing when outside of the pairing mode.