ESP32 Crashed when listening BLE advertising after long time
ESP32 Crashed when listening BLE advertising after long time
Hi,guys,
I got a crash when listening BLE advertising after long time. The crash INFO is followed:
BT: command_timed_out hci layer timeout waiting for response to a command. opcode: 0x200c[0m
***ERROR*** A stack overflow in task Tmr Svc has been detected.
abort() was called at PC 0x40086b24
Guru Meditation Error: Core 0 panic'ed (abort)
Backtrace: 0x40085c94:0x3ffd19a0 0x40084040:0x3ffd19c0 0x4008382f:0x3ffd19e0 0x4008579f:0x3ffd1a10 0x40085830:0x3ffd1a30 0x40085da3:0x3ffd1a60
I can't find opcode 0x200c in esp-idf. Does anyone can tell me why it crashed ?
Thanks.
I got a crash when listening BLE advertising after long time. The crash INFO is followed:
BT: command_timed_out hci layer timeout waiting for response to a command. opcode: 0x200c[0m
***ERROR*** A stack overflow in task Tmr Svc has been detected.
abort() was called at PC 0x40086b24
Guru Meditation Error: Core 0 panic'ed (abort)
Backtrace: 0x40085c94:0x3ffd19a0 0x40084040:0x3ffd19c0 0x4008382f:0x3ffd19e0 0x4008579f:0x3ffd1a10 0x40085830:0x3ffd1a30 0x40085da3:0x3ffd1a60
I can't find opcode 0x200c in esp-idf. Does anyone can tell me why it crashed ?
Thanks.
-
- Posts: 79
- Joined: Tue Apr 26, 2016 5:10 am
Re: ESP32 Crashed when listening BLE advertising after long time
How long were you scanning for devices?
I would suggest that it found too many devices while scanning.
I would suggest scanning for shorter periods.
If the device required is not found in the first scan, stop scanning then start scanning again.
This will alow FreeRTOS/ the BLE tasks to free up the buffers used in the previous scan which should prevent the stack overflow that you are experiencing.
I would suggest that it found too many devices while scanning.
I would suggest scanning for shorter periods.
If the device required is not found in the first scan, stop scanning then start scanning again.
This will alow FreeRTOS/ the BLE tasks to free up the buffers used in the previous scan which should prevent the stack overflow that you are experiencing.
Re: ESP32 Crashed when listening BLE advertising after long time
Thanks for your reply.
I have scanning BLE advertising for several hours.
That's true there are many BLE device in test environment.
However, I didn't concern the BLE device name, but the information in BLE advertising, It means that no specific device was required. And I also restart scanning when ESP_GAP_SEARCH_INQ_CMPL_EVT happened. The key code in esp_gap_callback as followed:
Maybe the method of restarting scanning was error, any other suggestion?
Thanks.
I have scanning BLE advertising for several hours.
That's true there are many BLE device in test environment.
However, I didn't concern the BLE device name, but the information in BLE advertising, It means that no specific device was required. And I also restart scanning when ESP_GAP_SEARCH_INQ_CMPL_EVT happened. The key code in esp_gap_callback as followed:
Code: Select all
case ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT: {
//the unit of the duration is second
gap_status = SCANNING;
esp_ble_gap_start_scanning(duration);
break;
}
case ESP_GAP_BLE_SCAN_RESULT_EVT: {
break;
}
case ESP_GAP_SEARCH_INQ_CMPL_EVT:{
//esp_ble_gap_stop_scanning();
//continue scanning...
vTaskDelay( 100 / portTICK_RATE_MS);
esp_ble_gap_start_scanning( duration );
break;
}
Thanks.
Re: ESP32 Crashed when listening BLE advertising after long time
I have the same question. do you have solve it ?
Re: ESP32 Crashed when listening BLE advertising after long time
The question is what task is Tmr Svc? Its internal task, probably timer. Since you have stack overflow you will need to change stack size in menuconfig if its possible for this task, but first someone need to help us to find out which task it is.
***ERROR*** A stack overflow in task Tmr Svc has been detected
-
- Posts: 19
- Joined: Mon Jun 03, 2019 3:46 pm
Re: ESP32 Crashed when listening BLE advertising after long time
Hello,
I'm having the same problem. I'm using v4.3 IDF version.
Did you solve the problem?
Regards,
Gianluca.
I'm having the same problem. I'm using v4.3 IDF version.
Did you solve the problem?
Regards,
Gianluca.
Re: ESP32 Crashed when listening BLE advertising after long time
Nice to see this post here and thanks for sharing this to us.
-
- Posts: 19
- Joined: Mon Jun 03, 2019 3:46 pm
Re: ESP32 Crashed when listening BLE advertising after long time
Hello everyone,
Has somebody any update about this issue?
Regards,
Gianluca.
Has somebody any update about this issue?
Regards,
Gianluca.
Re: ESP32 Crashed when listening BLE advertising after long time
Did you try to increase timer task stack in menuconfig?
-
- Posts: 19
- Joined: Mon Jun 03, 2019 3:46 pm
Who is online
Users browsing this forum: Baidu [Spider] and 165 guests