I am trying to connect a ESP32-S3-N16R8 board to my android via the Bluetooth and getting a Compilation error: #error Bluetooth is not enabled! Please run make menuconfig to and enable it.
I have changed the #include "BluetoothSerial.h" to "BLEDevice.h" but both generate the same error. New to Arduino, last time I was into programming, it was on punch cards. (Don't laugh). I am trying to program a robot for my grandson.
That poorly-worded error ("... to and enable...") shows up often with this error:
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
Thanks, I will check out the link. I did read that the ESP32-S3's are BLE so tried that but no good as i said. Also saw the poor grammar but I did learn that Engineers generally have not the best grammar and spelling, that's who developed spell checkers, out of need. I am a Mechanical Engineer, that's how I know.
Standard questions to eliminate possible issues:
Have you updated the ESP-32 library... there was an Espressif core problem a year ago.
Are you selecting ESP32-S3 DEV MOD for your "board" in the IDE?
What sketch are you using (post it here in a <CODE> block, using the <CODE> button)?
Have you tried an example from the BLE library?
Thanks for your response. Updated libraries and the correct board selected. I will try an example from the BLE Library now. Here is the sketch that gave me the error, (Please enlighten me on block, new to this programming;
// This example code is in the Public Domain (or CC0 licensed, at your option.)
// By Evandro Copercini - 2018
//
// This example creates a bridge between Serial and Classical Bluetooth (SPP)
// and also demonstrate that SerialBT have the same functionalities of a normal Serial
// Note: Pairing is authenticated automatically by this device
#include <Arduino.h>
#include "BLEManagerImpl.h"
String device_name = "ESP32-BT-Slave";
// Check if Bluetooth is available
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
// Check Serial Port Profile
#if !defined(CONFIG_BT_SPP_ENABLED)
#error Serial Port Profile for Bluetooth is not available or not enabled. It is only available for the ESP32 chip.
#endif
BLEManagerImpl SerialBT;
void setup() {
Serial.begin(115200);
SerialBT.begin(device_name); //Bluetooth device name
//SerialBT.deleteAllBondedDevices(); // Uncomment this to delete paired devices; Must be called after begin
Serial.printf("The device with name \"%s\" is started.\nNow you can pair it with Bluetooth!\n", device_name.c_str());
}
void loop() {
if (Serial.available()) {
SerialBT.write(Serial.read());
}
if (SerialBT.available()) {
Serial.write(SerialBT.read());
}
delay(20);
}
It does not appear to be in the BLE examples for the ESP32S3 Dev Module.
I would suggest that you use the UART sketch as a starting point. That sketch uses the Nordic UART UUIDs and will be able to interface with many phone apps.
What phone app are you trying to connect with the BLE server?
EDIT:
BLE is complicated compared to BT which uses the spp protocol. You may find it easier to use one of the original esp32 wroom modules which supports classic bluetooth.
Poorly worded, reminds me of a common Linux error "bummer".
Another one, on plugging a thumbdrive "this device hasn't been invented yet". It still worked though.