The SerialToSerialBT compiling failed for ESP32S3 why?

lladam
Posts: 44
Joined: Tue Jul 20, 2021 12:14 am

The SerialToSerialBT compiling failed for ESP32S3 why?

Postby lladam » Wed Mar 15, 2023 10:18 pm

Hi all,
the compiling for ESP32 Dev Module passed, failed for ESP32 S3, why and how to fix?
Thanks
Adam

Code: Select all

#include "BluetoothSerial.h"

#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif

#if !defined(CONFIG_BT_SPP_ENABLED)
#error Serial Bluetooth not available or not enabled. It is only available for the ESP32 chip.
#endif

BluetoothSerial SerialBT;

void setup() {
  Serial.begin(115200);
  SerialBT.begin("ESP32test"); //Bluetooth device name
  Serial.println("The device started, now you can pair it with bluetooth!");
}

void loop() {
  if (Serial.available()) {
    SerialBT.write(Serial.read());
  }
  if (SerialBT.available()) {
    Serial.write(SerialBT.read());
  }
  delay(20);
}
ERROR:

Code: Select all

Arduino: 1.8.19 (Windows 10), Board: "ESP32S3 Dev Module, Disabled, Disabled, QIO 80MHz, 4MB (32Mb), Core 1, Core 1, Hardware CDC and JTAG, Enabled, Disabled, Disabled, UART0 / Hardware CDC, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi), 921600, None, Disabled"

SerialToSerialBT_m:15:2: error: #error Serial Bluetooth not available or not enabled. It is only available for the ESP32 chip.

 #error Serial Bluetooth not available or not enabled. It is only available for the ESP32 chip.

  ^~~~~

exit status 1

#error Serial Bluetooth not available or not enabled. It is only available for the ESP32 chip.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: The SerialToSerialBT compiling failed for ESP32S3 why?

Postby MicroController » Thu Mar 16, 2023 1:48 am

I think the error message could not be any clearer.
It is only available for the ESP32 chip.
The original ESP32 has the required hardware for SPP (Bluetooth "classic", or "BR/EDR"), the ESP32S3 does not (BLE only); so nothing that could be fixed here.

Who is online

Users browsing this forum: Baidu [Spider] and 109 guests