1

I'm using this code here to read data from a BLE thermometer using an ESP32.

The code sometimes works fine and i can get the data:

+ Connect : a4:c1:38:69:0c:ff
 * Connected a4:c1:38:69:0c:ff
 + Found our service
 + Found our characteristic
 + Notify callback for characteristic ebe0ccc1-7a0a-4b0c-8a1a-6ff2997da3a6
temp = 21.8 C ; humidity = 48.0 % ; voltage = 2.564 V
 * Disconnected a4:c1:38:69:0c:ff

Other times i get a CPU panic, related to a stack error:

+ Connect : a4:c1:38:69:0c:ff
 * Connected a4:c1:38:69:0c:ff
 + Found our service
 + Found our characteristic
 + Notify callback for characteristic ebe0ccc1-7a0a-4b0c-8a1a-6ff2997da3a6
temp = 21.8 C ; humidity = 47.0 % ; voltage = 2.564 V
Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)
Debug exception reason: Stack canary watchpoint triggered (btuT) 
Core 0 register dump:
PC : 0x4000c472 PS : 0x00060a36 A0 : 0x8012b791 A1 : 0x3ffcf7e0 
A2 : 0x3ffcf7f4 A3 : 0x00000000 A4 : 0x00000268 A5 : 0x3ffcfa14 
A6 : 0x3ffde1ad A7 : 0x00000026 A8 : 0x8012987e A9 : 0x3ffd0270 
A10 : 0x3ffdb99c A11 : 0x3ffddca8 A12 : 0x3ffd050a A13 : 0x00000001 
A14 : 0x00000004 A15 : 0x00000000 SAR : 0x00000010 EXCCAUSE: 0x00000001 
EXCVADDR: 0x00000000 LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0x00000003 
ELF file SHA256: 0000000000000000
Backtrace: 0x4000c472:0x3ffcf7e0 0x4012b78e:0x3ffcf7f0 0x40129815:0x3ffcfa80 0x40125e62:0x3ffcfd10 0x401286e8:0x3ffcfd30 0x4012987b:0x3ffcffc0 0x40125e62:0x3ffd0250 0x401286e8:0x3ffd0270 0x4012987b:0x3ffd0500 0x40125e62:0x3ffd0790 0x401286e8:0x3ffd07b0 0x4012940a:0x3ffd0a40 0x40125e62:0x3ffd0a60 0x40129621:0x3ffd0a80 0x40125e62:0x3ffd0aa0 0x4012933d:0x3ffd0ac0 0x40129359:0x3ffd0ae0 0x40125e62:0x3ffd0b00 0x40125fa1:0x3ffd0b20 0x4012fb36:0x3ffd0b40 0x401042a6:0x3ffd0b60 0x4008ff9e:0x3ffd0b90
Rebooting...

I'm using an ESP-WROOM-32 with PlatformIO, what could be the issue?

asked Jan 9, 2022 at 11:35
2
  • the issue could be a software bug Commented Jan 9, 2022 at 18:20
  • Same problem, but I fix it. Use lib github.com/h2zero/NimBLE-Arduino Commented Jan 16, 2022 at 7:12

1 Answer 1

1

To help others. I resolved this issue by using the ArduinoBLE lib instead of the ESP32_BLE one I was using.

answered Jul 22, 2022 at 3:29
1
  • Usually we're looking for a little internal structure to answers rather than one-liners. So, if you have any useful details to add, that would be nice. But, otherwise if that resolved it cool. Welcome to ASE. Commented Jul 22, 2022 at 21:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.