Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLE Init causing Core 0 Panic (ESP IDF v5) #113

Open
DEADSEC-SECURITY opened this issue Mar 16, 2023 · 1 comment
Open

BLE Init causing Core 0 Panic (ESP IDF v5) #113

DEADSEC-SECURITY opened this issue Mar 16, 2023 · 1 comment

Comments

@DEADSEC-SECURITY
Copy link

Hey guys, so I was trying to implement Nimble in my CPP program using ESP-IDF v5 for a ESP32 but when I run NimBLEDevice::init("") the core panics and the program crashes.

The output:

I (1612) BTDM_INIT: BT controller compile version [8020d24]
E (1862) BLE_INIT: controller init failed

Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x40083404  PS      : 0x00060030  A0      : 0x800d57fa  A1      : 0x3ffda900  
0x40083404: nimble_port_run at C:/Espressif/frameworks/esp-idf-v5.0/components/bt/host/nimble/nimble/porting/nimble/src/nimble_port.c:216

A2      : 0x3ffc3f94  A3      : 0x00000000  A4      : 0x00000014  A5      : 0x3ffc3074  
A6      : 0x00000000  A7      : 0x80000001  A8      : 0x80093301  A9      : 0x3ffbbd40  
A10     : 0x00000003  A11     : 0x00060023  A12     : 0x00060023  A13     : 0x3ffbbe10  
A14     : 0x00000003  A15     : 0x00060223  SAR     : 0x00000000  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x000000a8  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  


Backtrace: 0x40083401:0x3ffda900 0x400d57f7:0x3ffda920
0x40083401: nimble_port_run at C:/Espressif/frameworks/esp-idf-v5.0/components/bt/host/nimble/nimble/porting/nimble/src/nimble_port.c:216

0x400d57f7: NimBLEDevice::host_task(void*) at C:/Users/amng8/Sync/PROJECTS/PillCPP/components/esp-nimble-cpp/src/NimBLEDevice.cpp:836

My app_main:

void app_main(void) {
    init_nvs();
    init_wifi();
    NimBLEDevice::init("");

    //auto *client = new mqtt::Client(config);
    //auto gPillDispenser = new PillDispenser(BLEAddress("A6:C0:82:01:17:72"), BROKER_CLIENT_ID, client);
}

Does ESP-Nimble support IDF 5? How can I fix this?

@siz-
Copy link

siz- commented Apr 11, 2023

Try to use the master branch as component. it solved my endless rebooting ble not initiating issue. A function has been removed from the API which causes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants