Issue with bluetoothSerial ESP32 (NodeMCU 32-S)

Hi, im trying to use the library BluetoothSerial, i had used with a ESP32CAM and works pretty fine, but now im trying to do the same with a NodeMCU32-S, and i have this errors:

abort() was called at PC 0x40195fd0 on core 1


Backtrace:0x40083679:0x3ffcccb00x40092d59:0x3ffcccd0 0x40098099:0x3ffcccf0 0x40195fd0:0x3ffccd70 0x40195dfb:0x3ffccd90 0x400fe803:0x3ffccdb0 0x400d679e:0x3ffccdd0 0x400d5db7:0x3ffcce20 0x400d30fd:0x3ffcce60 0x400d79f2:0x3ffccec0 




ELF file SHA256: 0000000000000000

Using a decoder i get this:
*Decoding stack results* 0x40083679: **panic_abort** at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/**panic.c** line **402** 0x40092d59: **esp_system_abort** at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/**esp_system.c** line **128** 0x40098099: **abort** at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/**abort.c** line **46** 0x400fe803: **esp_bt_controller_enable** at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/controller/esp32/**bt.c** line **1848** 0x400d679e: **btStart** at C:\Users\angel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\cores\esp32\**esp32-hal-bt.c** line **45** 0x400d5db7: **BluetoothSerial::begin(String, bool)** at C:\Users\angel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\libraries\BluetoothSerial\src\**BluetoothSerial.cpp** line **644** 0x400d30fd: **setup()** at C:\Users\angel\Desktop\Documentos EDUTECNO\Proyecto OVO\Codigo Arduino\Intento ESPNOW\intento3\ESP32/**ESP32.ino** line **56** 0x400d79f2: **loopTask(void*)** at C:\Users\angel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\cores\esp32\**main.cpp** line **42**

It says it abort when call Serial_BT.begin("BT_name"), what can be the problem?

My code its pretty long, but i made other just with the bluetooth part and i keep getting that

#include "BluetoothSerial.h"
#include <esp_wifi.h>
#include <esp_now.h>
#include <WiFi.h>

BluetoothSerial SerialBT;
void setup() {
  Serial.begin(115200);
  WiFi.mode(WIFI_STA);
  WiFi.setSleep(WIFI_PS_NONE);
  SerialBT.begin("OVO_BT");
}

void loop() {
  // put your main code here, to run repeatedly:

}

just ran the File>Examples>BluetoothSerial>Serial_to_SerialBT on a ESP32 ModeMCU without problems - communicated with BuletoothSerial app on an Android
Tools>board set to ESP32 Dev Module

which board did you select?

I actually solve the question, the problem was this:

WiFi.setSleep(WIFI_PS_NONE);

Wifi and bluetooth cannot work together with that line, but im using ESPnow too and that line helps the module to not go to sleep and improve the sending of packages. I replace the line with:

WiFi.setSleep(WIFI_PS_MIN_MODEM);

just in the time i needed to use the bluetooth, after the use i returned to the first one. :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.