Skip to content

Commit 337058a

Browse files
Fixes WiFiProv.ino (espressif#9946)
* Update WiFiProv.ino * fix(wifiprov): Uses BLE for provisioning * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 3686344 commit 337058a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/WiFiProv/examples/WiFiProv/WiFiProv.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ void SysProvEvent(arduino_event_t *sys_event) {
5353

5454
void setup() {
5555
Serial.begin(115200);
56+
WiFi.begin(); // no SSID/PWD - get it from the Provisioning APP or from NVS (last successful connection)
5657
WiFi.onEvent(SysProvEvent);
5758

5859
// BLE Provisioning using the ESP SoftAP Prov works fine for any BLE SoC, including ESP32, ESP32S3 and ESP32C3.
@@ -61,7 +62,7 @@ void setup() {
6162
// Sample uuid that user can pass during provisioning using BLE
6263
uint8_t uuid[16] = {0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf, 0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02};
6364
WiFiProv.beginProvision(
64-
WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name, service_key, uuid, reset_provisioned
65+
WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BLE, WIFI_PROV_SECURITY_1, pop, service_name, service_key, uuid, reset_provisioned
6566
);
6667
log_d("ble qr");
6768
WiFiProv.printQR(service_name, pop, "ble");

0 commit comments

Comments
 (0)