Provision Manager
ProvisionManager is a utility class that manages the Bluetooth provisioning process.
This class provides a set of functions to handle various Bluetooth operations, such as initializing the Bluetooth connection, scanning for devices, connecting to devices, retrieving device information, configuring Wi-Fi settings, and sending upgrade information to Bluetooth devices. It is designed to streamline the provisioning process for Bluetooth Low Energy (BLE) devices, including sensor configuration, Wi-Fi setup, and software upgrades.
Key features of this class include:
Initializing Bluetooth and managing connection state
Scanning for Bluetooth devices and filtering by device name or prefix
Connecting to, disconnecting from, and managing Bluetooth device states
Retrieving information from Bluetooth devices such as Wi-Fi networks, sensor state, and sensor info
Sending Wi-Fi configuration and upgrade information to devices
Handling device configuration completion notifications
Managing Bluetooth scan operations and cleanup
Functions
Adds a connection state callback
Connects to a Bluetooth device
Disconnects the Bluetooth device
Retrieves the sensor information from a Bluetooth device
Retrieves the sensor state from a Bluetooth device
Retrieves the upgrade state from a Bluetooth device
Retrieves the Wi-Fi list from a Bluetooth device
Initializes Bluetooth connection settings
Scans for Bluetooth devices with a specified prefix
Sends complete configuration information to a Bluetooth device
Sends upgrade information to a Bluetooth device
Stops the sensor firmware upgrade process for the specified BLE device.
Unregisters the Bluetooth receiver