Need help with ESP32 BT library

When using IDE 2.3.2 and compiling a sketch, I get the following:

In file included from c:\Users\occam\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIVirtualTransport.cpp:22:
c:Users\occam\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIVirtualTransport.h:29:10: fatal error: esp_bt.h: No such file or directory
29 | #include "esp_bt.h"
compilation terminated.
exit status 1
Compilation error: exit status 1

The sketch has the following includes:
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>

Any and all help appreciated - thanks

Does that file exist on your PC and, if so, where is it located ? Which board do you have selected in the IDE ?

Yes, win 11 search of drive C: showed this:

Hope that is readable for you, I could not preview.

Connected board is labeled esp32-wroom-32 on one side and esp32s on the other side. I have run many different sketches on it without problems.

Thank you for responding.

Further fumbling around, I tried compiling the sketch in both IDE 2.3.2 and 1.8.19.

2.3.2 gives the error message shown above.

1.8.19 gives a different error shown here:

BT_phone_0:23:10: fatal error: BLEServer.h: No such file or directory
#include <BLEServer.h>
^~~~~~~~~~~~~
compilation terminated.
exit status 1
BLEServer.h: No such file or directory

I am still lost and need help ...please... anyone?

Is your sketch from the Examples (included in the IDE with ESP32 install) ?

No, the sketch was designed to work with an iPhone robot control app called "MicroBlue".
The info header on the sketch is as follows:

  • Mechanismic Inc.
  • Created 2024
  • Created by Amanjeet Bagga
  • Last Modified 04/09/2024
  • Version 2.0
  • ESP32S3 TUTORIAL
  • The tutorial examples for the ESP32S3 to learn how to code
  • button, switch, and slider command elements in MicroBlue.
  • https://snappyxo.io/

I have tried to get in touch with Mechanismic, Amanjeet Bagga, and https://snappyxo.io/ with no success so far. I can upload the sketch if you think it would help. I have done many sketches with Arduinos, ESP32's, and others, but this is my first BTLE experience.

Do yo know if there is a BT "sniffer" that I could use to get enough info to write my own sketch? Or if the iPhone is a server, a client sketch that might work?

Thanks for your interest and I look forward to your response.

Have you taken a look at ESP32 Examples?

Thanks, I will give it a try. Stay tuned...

No joy trying

My examples are different from yours. I have no choice for "ESP32 BLE Arduino"

I am using examples for ESP32S2 Dev module.
You are showing examples for ESP32 Wrover module.
Could there be that much of a difference in examples?

I tried compiling the 'Client' example and it biffed. As it's an Example, I'm aghast.

static BLEUUID charUUID("beb5483e-36e1-4688-b7f5-ea07361b26a8");
BLE_client:12:8: error: 'BLEUUID' does not name a type
 static BLEUUID serviceUUID("4fafc201-1fb5-459e-8fcc-c5c9c331914b");

Rui Santos is fairly thorough (even though his stuff is heavily BME280 reliant) --
ESP32 BLE Server and Client (Bluetooth Low Energy) | Random Nerd Tutorials

BLE is not my forte - it looks a bigger pain than WiFi.
I guess iphones are unable to do SPP though. (C'est dommage.)

No relevance here but in my bumbling, just found that if you go to a library > library.properties > author & maintainer you may find some contact info.

Random Nerds tutorials on BLE server & client produce similar errors.

Sent note to Rui Santos. Fingers crossed...

Thanks for your interest.

Maybe this is the result of a ESP32 core (Boards Manager) update.

Installed esp32 boards manager ver. 2.0.17. Compiled sketch and got pages full of new errors.

Went back to ver. 3.0.1, compiled sketch and got same old errors.

No joy yet :frowning: