-
-
Notifications
You must be signed in to change notification settings - Fork 203
BLE Init stuck #1141
Description
My env: VS Code with platformio
My board ESP32-C6FH4 (QFN32) (revision v0.2)
Dependency Graph
|-- NimBLE-Arduino @ 2.5.0
|-- Preferences @ 3.3.7
Platoformio.ini
[env:seeed_xiao_esp32c6]
platform = espressif32
board = seeed_xiao_esp32c6
framework = arduino
board_build.f_cpu = 40000000L
lib_deps =
h2zero/NimBLE-Arduino @ ^2.2.0
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/seeed_xiao_esp32c6.html
PLATFORM: Espressif 32 (55.3.37) > Seeed Studio XIAO ESP32C6
HARDWARE: ESP32C6 40MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- contrib-piohome @ 3.4.4
- framework-arduinoespressif32 @ 3.3.7
- framework-arduinoespressif32-libs @ 5.5.0+sha.87912cd291
- tool-esp-rom-elfs @ 2024.10.11
- tool-esptoolpy @ 5.1.2
- toolchain-riscv32-esp @ 14.2.0+20251107
Hi,
I have my function trying to initialize NimBLEDevice::init("NimBLE"); but it stuck after this and never succeed to initialize it (it reach "Initializing NimBLE..." but never "NimBLE initialized""
PARTIAL CODE
// ─── Globals ─────────────────────────────────
NimBLEServer* pServer = nullptr;
NimBLEAdvertising* pAdvertising = nullptr;
Preferences prefs;
//
........
........
//
// ─── BLE init ────────────────────────────────
void bleInit(bool pairingMode) {
logMsg("bleInit called with pairingMode = " + String(pairingMode ? "true" : "false"));
logMsg(" - Initializing NimBLE...");
delay(2000);
NimBLEDevice::init("NimBLE");
logMsg(" - NimBLE initialized");
I tried also the NimBLE-Arduino @ 2.4.0 but the same behaviour unfortunately
EDIT: the problem was the "board_build.f_cpu = 40000000L" in platformio.ini