Fixes WiFiProv.ino (#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>
This commit is contained in:
parent
36863449e4
commit
337058ac94
1 changed files with 2 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ void SysProvEvent(arduino_event_t *sys_event) {
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
WiFi.begin(); // no SSID/PWD - get it from the Provisioning APP or from NVS (last successful connection)
|
||||||
WiFi.onEvent(SysProvEvent);
|
WiFi.onEvent(SysProvEvent);
|
||||||
|
|
||||||
// BLE Provisioning using the ESP SoftAP Prov works fine for any BLE SoC, including ESP32, ESP32S3 and ESP32C3.
|
// BLE Provisioning using the ESP SoftAP Prov works fine for any BLE SoC, including ESP32, ESP32S3 and ESP32C3.
|
||||||
|
|
@ -61,7 +62,7 @@ void setup() {
|
||||||
// Sample uuid that user can pass during provisioning using BLE
|
// Sample uuid that user can pass during provisioning using BLE
|
||||||
uint8_t uuid[16] = {0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf, 0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02};
|
uint8_t uuid[16] = {0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf, 0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02};
|
||||||
WiFiProv.beginProvision(
|
WiFiProv.beginProvision(
|
||||||
WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name, service_key, uuid, reset_provisioned
|
WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BLE, WIFI_PROV_SECURITY_1, pop, service_name, service_key, uuid, reset_provisioned
|
||||||
);
|
);
|
||||||
log_d("ble qr");
|
log_d("ble qr");
|
||||||
WiFiProv.printQR(service_name, pop, "ble");
|
WiFiProv.printQR(service_name, pop, "ble");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue