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

ESP32 aborts and reboots after sensor Service is found #2

Open
gerardwr opened this issue Aug 18, 2020 · 3 comments
Open

ESP32 aborts and reboots after sensor Service is found #2

gerardwr opened this issue Aug 18, 2020 · 3 comments

Comments

@gerardwr
Copy link

Hi,

I tried your code but I get into trouble.

I entered the address of my own sensor in your code.

After the sensor Service is found the ESP32 aborts and reboots. It does that every time.

Here is the serial output, any suggestions what might be wrong?

Thanks for sharing.

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
Starting MJ client...
Connected
 - Found our service

Stack smashing protect failure!

abort() was called at PC 0x4014cf13 on core 1

Backtrace: 0x40091c4c:0x3ffca160 0x40091e7d:0x3ffca180 0x4014cf13:0x3ffca1a0 0x400d48b2:0x3ffca1c0 0x400d48da:0x3ffca280 0x400d15ea:0x0c8a1a6f

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
Starting MJ client...
Connected
 - Found our service

Stack smashing protect failure!

abort() was called at PC 0x4014cf13 on core 1

Backtrace: 0x40091c4c:0x3ffca160 0x40091e7d:0x3ffca180 0x4014cf13:0x3ffca1a0 0x400d48b2:0x3ffca1c0 0x400d48da:0x3ffca280 0x400d15ea:0x0c8a1a6f

Rebooting...
@gerardwr
Copy link
Author

Ran the code again after setting DEbug Level to "verbose", this is part of the output when the "panic" ocoors, maybe this helps?

[D][BLEClient.cpp:158] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown
[V][FreeRTOS.cpp:113] give(): Semaphore giving: name: SearchCmplEvt (0x3ffdfcd0), owner: getServices
[V][BLEUtils.cpp:945] gattClientEventTypeToString(): Unknown GATT Client event type: 18
[V][FreeRTOS.cpp:79] wait(): << wait: Semaphore released: name: SearchCmplEvt (0x3ffdfcd0), owner: getServices
[V][BLEClient.cpp:429] getServices(): << getServices
[D][BLEDevice.cpp:154] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 4] ... Unknown
[V][BLEClient.cpp:389] getService(): << getService: found the service with uuid: ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6
[V][BLEUtils.cpp:945] gattClientEventTypeToString(): Unknown GATT Client event type: 18
[V][BLEUtils.cpp:1277] dumpGattClientEvent(): GATT Event: Unknown
[V][BLERemoteService.cpp:160] retrieveCharacteristics(): >> getCharacteristics() for service: ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x40081030  PS      : 0x00060530  A0      : 0x800d5f0d  A1      : 0x3ffca1e0  
A2      : 0x0a4b0c8a  A3      : 0x00000000  A4      : 0x00000021  A5      : 0x0000004b  
A6      : 0x3ffca252  A7      : 0x3ffca23c  A8      : 0x0a4b0c8a  A9      : 0x3ffca1a0  
A10     : 0x00000000  A11     : 0x00000000  A12     : 0x00000001  A13     : 0x00000000  
A14     : 0x3ffca23c  A15     : 0x00000000  SAR     : 0x00000018  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x0a4b0c8a  LBEG    : 0x4000c349  LEND    : 0x4000c36b  LCOUNT  : 0xffffffff  

Backtrace: 0x40081030:0x3ffca1e0 0x400d5f0a:0x3ffca200 0x400d62ae:0x3ffca2c0 0x400d19b6:0x0c8a1a6f

Rebooting...
ets Jun  8 2016 00:22:57

@karolkalinski
Copy link
Owner

Hi @gerardwr ,

It seems that is cause that was present in eariler version of the libray providing BLE for ESP32 boards. Could you check if the update to the newest version helps?
More details could be found here: nkolban/esp32-snippets#765.

Regards
Karol Kaliński

@gerardwr
Copy link
Author

gerardwr commented Aug 30, 2020

Thanks for getting back to me.

You suggestion was spot on.

In my Arduino 1.8.9 the file BleRemoteService.cpp contained:

	while (true) {
		uint16_t count = 10;  // this value is used as in parameter that allows to search max 10 chars with the same uuid

Changed the "10" in "1":

	while (true) {
		uint16_t count = 1; // only room for 1 result allocated, so go one by one

Now the sketch runs without errors and temp/hum from the thermometer is listed:

Starting MJ client...
Connected
 - Found our service
 - Found our characteristic
Notify callback for characteristic ebe0ccc1-7a0a-4b0c-8a1a-6ff2997da3a6
temp = 23.9 : humidity = 59.0 

Thanks for your help.

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