Open chegewara opened 3 years ago
Ok, we found it. My esp-idf version is older:
PS this is bt library that is working: 63e7a37c6c6c5647ed09ff5196c0b76ebd98de16 'components/bt/lib': checked out '1f1002a2c4589d1873fa41c49cb616208082cdb9' is broken
Thanks for reporting, we will look into.
Hi @chegewara ,
Can you help track the behavior of variables (static osi_mutex_t lock).
First rule out the case of no initialization, that is, the function btc_config_init is not executed.
@WCCWCC Sure, i can help. Is there a particular place you want me to check, or should i follow backtrace and find it?
Hi, @chegewara
This crash is related to this variable, it seems that it was not initialized or was released early
The purpose is to track the execution of variables(static osi_mutex_t lock).
You can write the following statement in the file(components/bt/bluedroid/btc/core/btc_config.c),
osi_mutex_new(&lock); printf("%s %d\n”, func,LINE);
osi_mutex_free(&lock); printf("%s %d\n”, func,LINE);
osi_mutex_lock(...); printf("%s %d\n”, func,LINE);
osi_mutex_unlock(...); printf("%s %d\n”, func,LINE);
make menuconfig --> bluetooth --> bluedroid options --> include ble security module(SMP)
make menuconfig --> bluetooth --> bluedroid options --> include ble security module(SMP)
Are there any problems with opening these configurations.
I hava same question as you,but I fixed it by found turn on that configuration for smp,
Hey, the same thing happened to me. I've tested what @WCCWCC suggested above, and it turns out that the BTC task tries to lock that config mutex, but that mutex it's not initialized if the SMP it's not enabled. The btc_config_init()
function which initializes that mutex is never called!
I've been trying to find out what introduced this regression since a couple of months ago this was working (I've been using this version before). II haven't found anything...
Can also confirm after upgraded my IDF from 3.3.2 to 3.3.3. Got crash with same output when trying to connect via BLE.
I plan to use BLE security in the future, so I'll just enable the SMP module and the problem is gone. Glad there is an easy workaround!
Did you find any solution to this problem? Using esp-idf 4.1 I also see the "Coex register schm btdm cb faild" message during esp_bt_controller_init() and then when I try to connect to the other device it crashes with: "Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled."
Backtrace: 0x401b544e: list_node at components/bt/common/osi/list.c:235 (discriminator 1) 0x401cb451: bta_gattc_co_cache_find_src_addr at components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c:629 0x401cb522: cacheOpen at components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c:126 0x401cb59d: bta_gattc_co_cache_open at components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c:239 0x401c7d21: bta_gattc_cache_load at components/bt/host/bluedroid/bta/gatt/bta_gattc_cache.c:2127 0x401c9ab1: bta_gattc_conn at components/bt/host/bluedroid/bta/gatt/bta_gattc_act.c:674 0x401c584e: bta_gattc_sm_execute at components/bt/host/bluedroid/bta/gatt/bta_gattc_main.c:292 0x401c5959: bta_gattc_hdl_event at components/bt/host/bluedroid/bta/gatt/bta_gattc_main.c:404 0x401cc48d: bta_sys_event at components/bt/host/bluedroid/bta/sys/bta_sys_main.c:499 0x401b6b17: osi_thread_run at components/bt/common/osi/thread.c:68
@geza-pycom We can't see the reason directly by the log, can you provide a step of repetition? If convenient can provide the code with the kconfig file.
Hi, the same problem here (idf v 3.3.3) I'm using ble gattc only ESP_BT_MODE_BLE (so no standard bt) And it looks like the function "btc_config_lock" is for standard BT, which is not initialized (by purpose) Enabling the SMP (but not using it) is really workaround for this issue.
@WCCWCC : the problem I explained "solved" when setting CONFIG_BT_GATTC_CACHE_NVS_FLASH to False in the configuration, however the "Coex register schm btdm cb faild" message is still dropped and I would like to understand what it exactly means. SMP module is enabled and used.
@chegewara @geza-pycom @jedi7
Hi, The IDF version I tested was release/v3.3 commit: bf02206096, the example is blufi.
I changed some of the Menuconfig configuration items:
But it did not reproduce the problem.
There must be some difference between my operation and yours. I would like to confirm the following informations with you
@xiewenxiang Not sure if I understand. The blufi example uses security, right? I'm using bte without security (see config) This is my NOT working configuration: https://pastebin.com/iiLTcsQg because of the issue. I will try an example where is only bte, if it can be reproduced.
Im no longer working on that project, so i cant confirm that SMP can be the problem.
Hi, im having strange crash, which is caused during blufi app connection.
Logs shows it is in bluedroid, due to problem with
(xQueueGenericReceive)- assert failed!
and i am sure there is enough free heap to create queue. Free heap after bluetooth init:ESP-IDF: v3.3.2-323-gbf0220609 commit bf022060964128556b3d3205b65c5d35df9beef6 (HEAD -> release/v3.3, origin/release/v3.3) gcc version 5.2.0 (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) After updating toolchain still same problem
All submodules updated Build OS: ubuntu 19.04/ ubuntu 20.04 build with old
make
on both OSsClient allows me to share elf file in PM. Thanks for help
@Campou can you help please