Factory reset module
The factory reset module allows to trigger device factory reset using a Configuration channel set operation. The factory reset clears the stored Fast Pair data, removes Bluetooth bonds and resets all of the Bluetooth local identities, apart from the default one that cannot be reset.
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 factory reset module requires enabling the following Kconfig options:
CONFIG_DESKTOP_CONFIG_CHANNEL_ENABLE - The factory reset is triggered using a Configuration channel set operation.
CONFIG_BT_FAST_PAIR
- The factory reset is performed using the Google Fast Pair Service (GFPS) API (bt_fast_pair_factory_reset()
).CONFIG_CAF_BLE_BOND_SUPPORTED
- The Bluetooth LE bond module must be ready before the factory reset is handled.
Use the CONFIG_DESKTOP_FACTORY_RESET Kconfig option to enable the factory reset module. The option is enabled by default if all of the required Kconfig options are enabled in configuration.
The CONFIG_DESKTOP_FACTORY_RESET Kconfig option selects the following Kconfig options:
CONFIG_BT_FAST_PAIR_STORAGE_USER_RESET_ACTION
- The module uses the user reset action to remove Bluetooth bonds and reset Bluetooth local identities.CONFIG_REBOOT
- The module triggers system reboot right after the factory reset operation is finished to ensure a proper device state after the factory reset.
Configuration channel options
The module registers itself as factory_reset
and provides the fast_pair
option.
Perform set operation on the option to trigger the factory reset operation.
Implementation details
The factory reset is delayed by 250 ms to ensure that the host computer finalizes the configuration channel set operation.