ESP32: 'Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled' caused

OP #6077720
I am trying to connect two ESP32 via Bluetooth, while one is serving as 
the server and one as a client. Connecting the client to the server 
works just fine and discovering the characteristic works too. But when I 
try to register the characteristic for notify, I get an error message.

The rest of my code seems to work just fine, because if I don't register 
the characteristic for notifying, I don't have any problems.
1
if (pRemoteCharacteristic->canNotify()) {
2
  Serial.println("Setting up notify");
3
  pRemoteCharacteristic->registerForNotify(notifyCallback);
4
}
I always get the following error message:
1
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
2
Core 1 register dump:
3
PC      : 0x400d495f  PS      : 0x00060330  A0      : 0x800d4154      A1      : 0x3ffca250
4
A2      : 0x00000000  A3      : 0x3ffca29e  A4      : 0x00000002      A5      : 0x00000000
5
A6      : 0x3ffe1ac8  A7      : 0x3f01a2e0  A8      : 0x800d3e4c      A9      : 0x3ffca200
6
A10     : 0x3ffca24c  A11     : 0xaab8b50c  A12     : 0x3ffc60e4      A13     : 0xaab8b50c
7
A14     : 0x3ffca200  A15     : 0xff000000  SAR     : 0x00000008      EXCCAUSE: 0x0000001c
8
EXCVADDR: 0x00000030  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6      LCOUNT  : 0x00000000
9

10
Backtrace: 0x400d495f:0x3ffca250 0x400d4151:0x3ffca280 0x400d1ba5:0x3ffca2e0 0x400d1c42:0x3ffca350 0x400d86bd:0x3ffca390 0x40090461:0x3ffca3b0

Does anyone know how to avoid this error?

Thanks in advance,
Dennis
Guest #6077743
That means, the program crashed somewhere.

The "Guru Meditation Error" is a joke, referring to Commodore Amiga 
computers.
OP #6078562
notifyCallback should be a function.
1
static void notifyCallback(
2
  BLERemoteCharacteristic* pBLERemoteCharacteristic,
3
  uint8_t* pData,
4
  size_t length,
5
  bool isNotify) {
6
    Serial.println("got notified");
7

8
    Serial.print("Notify callback for characteristic ");
9
    Serial.print(pBLERemoteCharacteristic->getUUID().toString().c_str());
10
    Serial.print(" of data length ");
11
    Serial.println(length);
12
    Serial.print("data: ");
13
    Serial.println((char*)pData);
14
}

Reply

A question of your own? This thread is over 6 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.