Code Monkey home page Code Monkey logo

Comments (2)

JanB97 avatar JanB97 commented on May 28, 2024

Okay, I finally figured it out.
I unconsciously updated the ESP32 Board Library to version 3, this seems to break nimble as some apis where changed.

from nimble-arduino.

andrewchilds avatar andrewchilds commented on May 28, 2024

Thanks to @JanB97 for posting this. I experienced this as well and downgrading the board to 2.x solved it for me.

@h2zero, just to add more data for this:

Using "esp32" board library version 3.0.0-rc1, the "ESP32S3 Dev Module" board, and the following test code in Arduino IDE version 2.3.2:

#include <NimBLEDevice.h>

void setup() {
    Serial.begin(115200);
    delay(1000);
    Serial.println("Begin setup...");

    NimBLEDevice::init("");

    // Delaying here just to allow time to reset/boot device during upload
    delay(10000);

    NimBLEScan* pScan = NimBLEDevice::getScan();
    pScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks(), true);
    pScan->setActiveScan(true);

    Serial.println("Going to start scanning...");

    pScan->start(5, false); // crash happens here
    Serial.println("esp32 3.0.0-rc will never get here.");
}

void loop() {
}

I see the following output:

13:58:40.995 -> Begin setup...
13:58:50.356 -> Going to start scanning...
13:58:50.356 -> Guru Meditation Error: Core  0 panic'ed (Unhandled debug exception). 
13:58:50.356 -> Debug exception reason: Stack canary watchpoint triggered (ipc0) 
13:58:50.356 -> Core  0 register dump:
13:58:50.356 -> PC      : 0x40382a9e  PS      : 0x00060036  A0      : 0x80381068  A1      : 0x3fcf0bc0  
13:58:50.356 -> A2      : 0x3fc97c04  A3      : 0xffffffff  A4      : 0x00060023  A5      : 0x00060023  
13:58:50.388 -> A6      : 0xb33fffff  A7      : 0xb33fffff  A8      : 0x80382c31  A9      : 0x3fc99420  
13:58:50.388 -> A10     : 0x00060023  A11     : 0x00000001  A12     : 0x00060021  A13     : 0x00000001  
13:58:50.388 -> A14     : 0x03c97b48  A15     : 0x3fc97b48  SAR     : 0x00000004  EXCCAUSE: 0x00000001  
13:58:50.388 -> EXCVADDR: 0x00000000  LBEG    : 0x40056f5c  LEND    : 0x40056f72  LCOUNT  : 0xffffffff  
13:58:50.419 -> 
13:58:50.419 -> 
13:58:50.419 -> Backtrace: 0x40382a9b:0x3fcf0bc0 0x40381065:0x3fcf0bf0 0x40382e28:0x3fcf0c20 0x40382e1e:0xa5a5a5a5 |<-CORRUPTED
13:58:50.419 -> 
13:58:50.419 -> 
13:58:50.419 -> 
13:58:50.419 -> 
13:58:50.419 -> ELF file SHA256: 5f00d74f42bdbacf
13:58:50.419 -> 
13:58:50.419 -> Rebooting...
13:58:50.419 -> ESP-ROM:esp32s3-20210327
13:58:50.419 -> Build:Mar 27 2021
13:58:50.419 -> rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
13:58:50.419 -> Saved PC:0x403775a1
13:58:50.451 -> SPIWP:0xee
13:58:50.451 -> mode:DIO, clock div:1
13:58:50.451 -> load:0x3fce3818,len:0x508
13:58:50.451 -> load:0x403c9700,len:0x4
13:58:50.451 -> load:0x403c9704,len:0xad0
13:58:50.451 -> load:0x403cc700,len:0x29d8
13:58:50.451 -> entry 0x403c9880

Once I downgraded esp32 from 3.0.0-rc to 2.0.16 the test code worked fine.

from nimble-arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.