Comments on: ESP32 Wi-Fi Provisioning via BLE (Bluetooth Low Energy) – Arduino IDE https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sun, 29 Jun 2025 09:03:56 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Lee https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-1062258 Sun, 29 Jun 2025 09:03:56 +0000 https://randomnerdtutorials.com/?p=150108#comment-1062258 In trying this on a Xiao ESP32-C3, I found that the initial text and most of the QR code would not print on the Serial terminal. It seems that the Serial buffer overflows before it has a started to output serial.
The fix for this is to put delay(1000); immediately after Serial.begin(115200);
Ie.
setup() {
Serial.begin(115200);
delay(1000); //Delay values less than 1000 cause the Serial buffer to overflow
WiFi.begin(); // no SSID/PWD – get it from the Provisioning APP or from NVS etc.
WiFi.onEvent(SysProvEvent);
..etc

]]>
By: marcomarco++ https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-1013016 Mon, 03 Mar 2025 19:52:47 +0000 https://randomnerdtutorials.com/?p=150108#comment-1013016 The code is Good!! the problem with the QR code it is this code is difficult to read by the app, I have created a new one with the Json return by it.. (using an online tool to generate qr code){“ver”:”v1″,”name”:”PROV_XXX”,”pop”:”123456″,”transport”:”ble”} and works fine.. I’m trying to get the expressif code to make my own version on jetpack compose..

]]>
By: Yme https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-995354 Sat, 28 Dec 2024 19:49:09 +0000 https://randomnerdtutorials.com/?p=150108#comment-995354 In reply to Sara Santos.

Hi Sara,
Thanxx.
It is working right now.
Awesome.
Beste of luck, Yme

ps.
Question:
Do you have any suggestion how to assign a variable to the SSID and one for the password?

?? (const char *)sys_event->event_info.prov_cred_recv.ssid ??

?? (char const *)sys_event->event_info.prov_cred_recv.password ??

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-995271 Sat, 28 Dec 2024 11:47:59 +0000 https://randomnerdtutorials.com/?p=150108#comment-995271 In reply to Yme.

Hi.
Thanks for letting us know.
There were some changes on the library.
The code is updated now. Copy and test it again. It should compile without issues.

Regards,
Sara

]]>
By: Yme https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-995086 Fri, 27 Dec 2024 20:20:22 +0000 https://randomnerdtutorials.com/?p=150108#comment-995086 Hi Sara,
i tried the example code for wifi provisioning with a ESP32 wroom 32 board and ESP32 wrover module.
I updated the ESP32 with the board manager to the latest version.
Can you help me with this one please?
Yme Dikkerboom

ps. Happy 2025!

Still i get the following faults:

C:\Users\ydikk\AppData\Local\Temp.arduinoIDE-unsaved20241127-10676-17x4rs3.m1v4f\sketch_dec27a\sketch_dec27a.ino: In function ‘void SysProvEvent(arduino_event_t*)’:
C:\Users\ydikk\AppData\Local\Temp.arduinoIDE-unsaved20241127-10676-17x4rs3.m1v4f\sketch_dec27a\sketch_dec27a.ino:34:54: error: ‘WIFI_PROV_STA_AUTH_ERROR’ was not declared in this scope
34 | if(sys_event->event_info.prov_fail_reason == WIFI_PROV_STA_AUTH_ERROR)
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\ydikk\AppData\Local\Temp.arduinoIDE-unsaved20241127-10676-17x4rs3.m1v4f\sketch_dec27a\sketch_dec27a.ino: In function ‘void setup()’:
C:\Users\ydikk\AppData\Local\Temp.arduinoIDE-unsaved20241127-10676-17x4rs3.m1v4f\sketch_dec27a\sketch_dec27a.ino:59:27: error: ‘WIFI_PROV_SCHEME_BLE’ was not declared in this scope; did you mean ‘NETWORK_PROV_SCHEME_BLE’?
59 | WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name, service_key, uuid, reset_provisioned);
| ^~~~~~~~~~~~~~~~~~~~
| NETWORK_PROV_SCHEME_BLE
C:\Users\ydikk\AppData\Local\Temp.arduinoIDE-unsaved20241127-10676-17x4rs3.m1v4f\sketch_dec27a\sketch_dec27a.ino:59:49: error: ‘WIFI_PROV_SCHEME_HANDLER_FREE_BTDM’ was not declared in this scope; did you mean ‘NETWORK_PROV_SCHEME_HANDLER_FREE_BTDM’?
59 | WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name, service_key, uuid, reset_provisioned);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| NETWORK_PROV_SCHEME_HANDLER_FREE_BTDM
C:\Users\ydikk\AppData\Local\Temp.arduinoIDE-unsaved20241127-10676-17x4rs3.m1v4f\sketch_dec27a\sketch_dec27a.ino:59:85: error: ‘WIFI_PROV_SECURITY_1’ was not declared in this scope; did you mean ‘NETWORK_PROV_SECURITY_1’?
59 | WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name, service_key, uuid, reset_provisioned);
| ^~~~~~~~~~~~~~~~~~~~
| NETWORK_PROV_SECURITY_1

exit status 1

Compilation error: ‘WIFI_PROV_STA_AUTH_ERROR’ was not declared in this scope

]]>
By: rokenbuzz https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-994923 Fri, 27 Dec 2024 05:45:48 +0000 https://randomnerdtutorials.com/?p=150108#comment-994923 Hopefully this gets fixed long term. This blog post says to comment a line in esp32-hal-misc.c:
robotdazero.it/blog/come-correggere-errore-259-sui-programmi-esp32-per-bluetooth/

esp32-hal-misc.c:
#ifdef CONFIG_BT_ENABLED
if(!btInUse()){
//esp_bt_controller_mem_release(ESP_BT_MODE_BTDM);
}
#endif

For me this is the path to the file:
C:\Users\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-misc.c
I made the modification, did a full clean in platformio, and built, and it fixed my problem for now.

]]>
By: Peter https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-956057 Wed, 11 Sep 2024 08:50:46 +0000 https://randomnerdtutorials.com/?p=150108#comment-956057 Hi Sara I’m getting to the part where it says “Provisioning Successful” but then I get this:

E (52249) wifi_prov_scheme_ble: bt_mem_release of BTDM failed 259
-> Provisioning Ends
and the wifi connection fails
8*(

]]>
By: andrew https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-913143 Mon, 06 May 2024 11:44:58 +0000 https://randomnerdtutorials.com/?p=150108#comment-913143 This ESP32 Wi-Fi provisioning tutorial with BLE is a game-changer for IoT projects!

]]>
By: greg https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-909335 Wed, 24 Apr 2024 14:24:10 +0000 https://randomnerdtutorials.com/?p=150108#comment-909335 In reply to RĂ¼diger Thomas Kreis.

Hi, The QR code works if you copy and paste it into a notepad ( so the formatting is correct). Also you don’t need the PROV_.. you can just remove that from the prefix at the top in the provisioning app if you don’t want that.

]]>
By: Jose Serena https://randomnerdtutorials.com/esp32-wi-fi-provisioning-ble-arduino/#comment-905287 Fri, 12 Apr 2024 17:51:41 +0000 https://randomnerdtutorials.com/?p=150108#comment-905287 In reply to Motti.

You can configure your DHCP server to always give the same IP address to a specific MAC, in this case the MAC of your ESP board

]]>