Package selection guidance compiled from public package information, community data, and project usage.
A Flutter plugin designed to streamline the configuration of ESP32 modules via Bluetooth Low Energy (BLE). It enables seamless over-the-air setup by allowing devices to discover, connect, and configure ESP32 units through a simple and consistent interface. Ideal for IoT projects requiring rapid deployment and device onboarding without complex wiring or manual network input. The plugin supports both Android and iOS platforms, ensuring broad compatibility across mobile environments.
Use cases
IoT device onboarding
Wireless ESP32 configuration
Smart home device setup
Automated firmware provisioning
Remote device management
Key features
BLE-based device provisioning
Cross-platform support (Android & iOS)
Simple API for device discovery
Secure connection handling
Real-time status feedback
Suitable for
IoT developers
Embedded systems engineers
Mobile app creators for smart devices
Hardware startups
Field technicians deploying connected devices
Considerations
Requires BLE-capable devices
Limited to ESP32 modules with compatible firmware
Background mode may require additional configuration
Network permissions needed on Android
iOS background execution limitations
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
esp_provisioning_ble
A library for provisioning a ESP32 with Bluetooth BLE
The transport attribute accepts only the ProvTransport type, and the security attribute accepts only the ProvSecurity type, which has an implementation called Security1 that you will use to pass the Proof-of-Possession (PoP).
Establish a session with the device:
After that, you will need to establish a session with the device. You can do this using the establishSession function, which returns three types of EstablishSessionStatus:
Connected: When the device establishes a connection successfully.
Disconnected: When an error occurs while establishing a connection with the device.
KeyMismatch: When the Proof-of-Possession (PoP) is incorrect.
var sessionStatus = await prov.establishSession();
log.d("Session Status = $sessionStatus");
switch (sessionStatus) {
caseEstablishSessionStatus.Connected:
emit(BleWifiEstablishedConnectionState());
caseEstablishSessionStatus.Disconnected:
emit(BleWifiEstablishedConnectionFailedState());
caseEstablishSessionStatus.Keymismatch:
emit(BleWifiEstablishedConnectionKeyMismatch());
}
Scan networks from the device:
To scan Wi-Fi networks, use the startScanWifi function, which returns a list of WifiAp objects, each of which has the following attributes:
String ssid
int rssi
bool active
bool private
var listWifi = await prov.startScanWiFi();
log.d('Found ${listWifi.length} Wi-Fi networks');
for (var obj in listWifi) {
log.d('Wi-Fi network: ${obj.ssid}');
}
Send and Apply WI-Fi Config:
To send and apply config use the sendWifiConfig and applyWifiConfig functions, respectively.
The Protocol Communication (protocomm) component manages secure
sessions and provides the framework for multiple transports. The
application can also use the protocomm layer directly to have
application-specific extensions for the provisioning or non-provisioning
use cases.
Following features are available for provisioning:
Proof-of-possession (support with protocomm_security1 only)
Salt and Verifier (support with protocomm_security2 only)
Protocomm internally uses protobuf (protocol buffers) for secure
session establishment. Users can choose to implement their own security
(even without using protobuf). Protocomm can also be used without any
security layer.
Protocomm provides the framework for various transports:
Bluetooth LE
Wi-Fi (SoftAP + HTTPD)
Console, in which case the handler invocation is automatically
taken care of on the device side. See Transport Examples below for code
snippets.
Note that for protocomm_security1 and protocomm_security2, the client
still needs to establish sessions by performing the two-way handshake.
See Unified Provisioning for more details about the secure handshake logic.
Comparasion:
Comparison with esp_provisioning_softap package:
Repo
softap support
ble support
cryptography
protobuf
esp_provisioning_softap
✔️
✖️
✔️ (2.0.1)
✔️ (2.0.0)
esp_provisioning_ble
✖️
✔️
✔️ (2.5.0)
✔️ (3.0.0)
Last update: 10/06/2023 (Octorber 6, 2023).
TODOS:
Test and create examples of the package with others Bluetooth packages.