BLE Notification Function Call Causes Crash. Can anybody understand this register dump and what would cause it?
Posted: Mon Jan 18, 2021 7:58 pm
I am trying to get BLE notification data from my Beetle BLE and am struggling to connect to the notify service. When using multiple BLE scanner apps on my phone, I can subscribe to the notifications and see the data flow in, but when I try to run the ESP32 scanner code, it crashes when I call pRemoteCharacteristic->registerForNotify(notifyCallback); I also call this function right after I call if(pRemoteCharacteristic->canNotify()) so I know that the notify byte is set.
When the ESP32 gets to the registerForNotify line, it get this error:
Does anybody know why this would happen?
Here is a link to the code that I am using:
https://pastebin.com/jMAvFPj3
When the ESP32 gets to the registerForNotify line, it get this error:
Code: Select all
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4000c2af PS : 0x00060130 A0 : 0x800d23b8 A1 : 0x3ffc8610
A2 : 0x3ffc862a A3 : 0x00000007 A4 : 0x00000006 A5 : 0x3ffc862a
A6 : 0x00060d20 A7 : 0x00000000 A8 : 0x800d70bd A9 : 0x3ffc85f0
A10 : 0x00000018 A11 : 0x3f4014a5 A12 : 0x00000018 A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000016 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000007 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffa
Backtrace: 0x4000c2af:0x3ffc8610 0x400d23b5:0x3ffc8620 0x400d1c06:0x3ffc8650 0x400d1f4a:0x3ffc86a0 0x400d76dd:0x3ffc86f0 0x4008e089:0x3ffc8710
Here is a link to the code that I am using:
https://pastebin.com/jMAvFPj3