Comments on: Getting Started with ESP32 Bluetooth Low Energy (BLE) on Arduino IDE https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Tue, 16 Dec 2025 00:12:17 +0000 hourly 1 https://wordpress.org/?v=6.8.5 By: Sara Santos https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1138262 Tue, 16 Dec 2025 00:12:17 +0000 http://randomnerdtutorials.com/?p=63505#comment-1138262 In reply to Ramesh Sargar.

Hi.
I don’t have much experience in writing data continuously via BLE, but I would say that’s probably a limitation of the ESP32 BLE stack.
Regards,
Sara

]]>
By: Ramesh Sargar https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1137986 Mon, 15 Dec 2025 07:51:47 +0000 http://randomnerdtutorials.com/?p=63505#comment-1137986 Hi Ma’am (Sara Santos),

I am facing an issue on the ESP32-WROOM-32E module related to the Bluetooth BLE write function. When I send continuous data using BLE.write(), the function gets stuck periodically every ~5 seconds for about 2–3 ms. Since my project is time-critical, I need the data to be transmitted continuously without interruption.

I have tried multiple approaches to resolve this issue, including using queues, ring buffers, FreeRTOS tasks, and changing task priorities, but the problem still persists.

Could you please guide me on how to overcome this issue or let me know if this behavior is a known limitation of the ESP32 BLE stack?

Thank you.

]]>
By: Wedekind https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1070722 Fri, 18 Jul 2025 11:24:58 +0000 http://randomnerdtutorials.com/?p=63505#comment-1070722 I’m testing the example UART.ino. I start it out ouf the list that was opened when I select the BLE examples.
regards
Engelbert

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1070718 Fri, 18 Jul 2025 11:13:17 +0000 http://randomnerdtutorials.com/?p=63505#comment-1070718 In reply to Wedekind.

Hi.
What was exactly the example that you tested?
Regards,
Sara

]]>
By: Wedekind https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1070693 Fri, 18 Jul 2025 09:37:10 +0000 http://randomnerdtutorials.com/?p=63505#comment-1070693 I would like to use an ESP 32 board to make a connection betwen my ESP 32 and my smart phone to collect and display parameters. At first I start a sketch out off the examples:
\BLE\UART.ino
my ARDUINO IDE version is 2.3.6 and I select an ESP32-2432S028 CYD board and the ESP32 BLE ARDUINO (1.0.1) library.

after translation I get a lot of error massages, for example:
Arduino\libraries\ESP32_BLE_Arduino\src/BLEAdvertising.h:15,
from Documents\Arduino\libraries\ESP32_BLE_Arduino\src/BLEServer.h:19,
from Documents\Arduino\UART\UART.ino:25:
Arduino\libraries\ESP32_BLE_Arduino\src/FreeRTOS.h:61:35:
error: ‘ringbuf_type_t’ has not been declared
61 | Ringbuffer(size_t length, ringbuf_type_t type = RINGBUF_TYPE_NOSPLIT);

Compilation error: ‘class BLECharacteristic’ has no member named ‘getValue’; did you mean ‘setValue’?

I start the translation without any changes, but I get allways the same messages and the code does not work. I was sure, if I use an example from the IDE it should work, but it doesn’t.
I change the selection to any other boards, but it was the same.
has anyone any good idea why?
best regards
Engelbert

]]>
By: Raj https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1068918 Mon, 14 Jul 2025 16:27:17 +0000 http://randomnerdtutorials.com/?p=63505#comment-1068918 Great job guys. Your work and site are extremely helpful.
Please note that the your settings setInterval(100) and setWindow(99) will effectively disable WiFi AP mode. (Interval is how long to wait between BLE scans, Window is how long to scan). I’d suggest setting the Window to 15. ESP32 has one radio, and by default, it prioritizes BLE over WiFi. With your settings, there is not much time left for WiFi.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1033203 Fri, 02 May 2025 09:30:57 +0000 http://randomnerdtutorials.com/?p=63505#comment-1033203 In reply to Ben Rodanski.

Ok.
pioarduino worked just fine in my setup.

Regards,
Sara

]]>
By: Ben Rodanski https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1033040 Thu, 01 May 2025 21:28:49 +0000 http://randomnerdtutorials.com/?p=63505#comment-1033040 In reply to Sara Santos.

Thanks, Sara!

After installing the pioarduino extension, the error did not disappear. Had to dive deep into the BLE libraries and found the problem. The libraries used by Arduino IDE are different thae the ones used in PlatformIO. Comparing them I found that the offending function BLEScan::start(scanTime, false) was declared differently in the PlatformIO dependencies directory:
C:\Users\ben.platformio\packages\framework-arduinoespressif32\libraries\BLE\src\BLEScan.cpp

Before modification:

BLEScanResults BLEScan::start(uint32_t duration, bool is_continue) {
if(start(duration, nullptr, is_continue)) {
m_semaphoreScanEnd.wait(“start”); // Wait for the semaphore to release.
}
return m_scanResults;
} // start

After modification:

BLEScanResults *BLEScan::start(uint32_t duration, bool is_continue) {
if(start(duration, nullptr, is_continue)) {
m_semaphoreScanEnd.wait(“start”); // Wait for the semaphore to release.
}
return &m_scanResults;
} // start

Of course, the header in BLEScan.h had to be modified as well.

Now it compiles and works ok on the old version of the Espressif 32 platform.

I tried to install the new version, as per your latest tutorial, but run into trouble. After changing the platform line in the platformio.ini file, the system started resolving the esp32dev dependencies, but it seems to have gone into infinite loop somewhere:

Resolving esp32dev dependencies…
Platform Manager: Installing https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

Nothing was happening for about 30 minutes, so I terminated the process.
I had to remove the pioarduino extension and reinstall the VS Code…
For now I will stick to the old Espressif32 platform.

Cheers,
Ben

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1032630 Wed, 30 Apr 2025 21:08:33 +0000 http://randomnerdtutorials.com/?p=63505#comment-1032630 In reply to Ben.

Hi.
That is probably because VS Code + PlatformIO uses a deprecated version (version 2) of the ESP32 core.
To use the latest version, you need to use pioarduino (a fork of PlaformIO that supports the latest ESP32 core version).

We’ll publish a tutorial about that subject tomorrow. So, stay tuned.

Regards,
Sara

]]>
By: Ben https://randomnerdtutorials.com/esp32-bluetooth-low-energy-ble-arduino-ide/#comment-1032417 Wed, 30 Apr 2025 06:44:37 +0000 http://randomnerdtutorials.com/?p=63505#comment-1032417 Hi,
The BLE Scanner code compiles and runs ok on Arduino IDE 2.3.6, but gives a compilation error on VS Code:

Compiling .pio\build\esp32dev\libac6\BLE\BLERemoteService.cpp.o
src/main.cpp: In function ‘void loop()’:
src/main.cpp:36:65: error: cannot convert ‘BLEScanResults’ to ‘BLEScanResults*’ in initialization
BLEScanResults *foundDevices = pBLEScan->start(scanTime, false);

Any ideas?

]]>