Bluetooth failure after update

jesseb
Posts: 29
Joined: Tue Jan 10, 2017 5:36 pm

Bluetooth failure after update

Postby jesseb » Tue Jan 10, 2017 5:53 pm

I based a gatt server off of the demo gatt server and it was working fine until I updated the esp-idf yesterday (it had been a few weeks since I updated it last). Something is causing a crash. I get the following error:

Guru Meditation Error of type InstrFetchProhibited occurred on core 0. Exception was unhandled.
Register dump:
PC : 0xffffffff PS : 0x00060d30 A0 : 0x80019128 A1 : 0x3ffd3ca0
A2 : 0xffffffff A3 : 0x3ffbb806 A4 : 0x00000006 A5 : 0x40019138
A6 : 0x3ffbb80d A7 : 0x00000001 A8 : 0x80017920 A9 : 0x00000003
A10 : 0x3ffbb806 A11 : 0x00000007 A12 : 0x4001751c A13 : 0x3ffb8140
A14 : 0x00000005 A15 : 0x17e722cd SAR : 0x00000010 EXCCAUSE: 0x00000014
EXCVADDR: 0xfffffffc LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0xffffffff

I did some debugging and found that the error comes when calling
xQueueSend in btc_task_post
btc_task_post is called from btc_transfer_context
btc_transfer_context is called from esp_bluedroid_enable
which is called from my initialization code:

esp_err_t ret;

esp_bt_controller_init();

ret = esp_bluedroid_init();
if (ret) {
ESP_LOGE(GATTS_TAG, "%s init bluetooth failed\n", __func__);
return;
}

ret = esp_bluedroid_enable();
if (ret) {
ESP_LOGE(GATTS_TAG, "%s enable bluetooth failed\n", __func__);
return;
}

esp_ble_gatts_register_callback(gatts_event_handler);
esp_ble_gap_register_callback(gap_event_handler);
esp_ble_gatts_app_register(PROFILE_A_APP_ID);
esp_ble_gatts_app_register(PROFILE_B_APP_ID);

I tried a few different sdk configurations but couldn't get it to work. Could someone help me with this one?

jesseb
Posts: 29
Joined: Tue Jan 10, 2017 5:36 pm

Re: Bluetooth failure after update

Postby jesseb » Thu Jan 12, 2017 9:47 pm

I got it working. Downloaded a new sdkconfig file and reset the parameters I needed.

irobux
Posts: 9
Joined: Tue Jan 03, 2017 9:36 am

Re: Bluetooth failure after update

Postby irobux » Fri Jan 13, 2017 7:01 pm

Hello :)
How did you do this ? "Downloaded a new sdkconfig file and reset the parameters I needed."

jesseb
Posts: 29
Joined: Tue Jan 10, 2017 5:36 pm

Re: Bluetooth failure after update

Postby jesseb » Thu Jan 19, 2017 5:17 pm

Sorry for the slow response, I have my own make system so my sdkconfig isn't the same one that I get when updating the git repository. Thus, my sdk config wasn't updated when I updated the repository so I got the one from the template app to start fresh.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Bluetooth failure after update

Postby kolban » Thu Jan 19, 2017 6:04 pm

I seem to have been getting away with simply deleting sdkconfig and running "make menuconfig". The result is a new sdkconfig file with the defaults (assuming I didn't change any of those in the "make menuconfig" session)
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: No registered users and 85 guests