Closed formus14 closed 3 years ago
Hi @formus14,
Thanks for reporting this. I was able to reproduce the same using the default config, by disabling the option CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
. As a workaround, re-enabling this option should prevent the assert.
Most of the Bluetooth engineers are currently on holiday for Chinese New Year, so it may be a week or two before someone gets back to you with more details. Thanks for your patience.
@projectgus any updates on this ?!
Please test with this patch, (can't upload file, just paste it here): And we will fix it on release version as soon as possible.
diff --git a/components/bt/controller/bt.c b/components/bt/controller/bt.c
index c506290..5602d10 100644
--- a/components/bt/controller/bt.c
+++ b/components/bt/controller/bt.c
@@ -1113,7 +1113,7 @@ static uint8_t coex_schm_curr_period_get_wrapper(void)
#if CONFIG_SW_COEXIST_ENABLE
return coex_schm_curr_period_get();
#else
- return 0;
+ return 1;
#endif
}
@@ -1131,7 +1131,7 @@ static int coex_wifi_channel_get_wrapper(uint8_t *primary, uint8_t *secondary)
#if CONFIG_SW_COEXIST_ENABLE
return coex_wifi_channel_get(primary, secondary);
#else
- return 0;
+ return -1;
#endif
}
@@ -1140,7 +1140,7 @@ static int coex_register_wifi_channel_change_callback_wrapper(void *cb)
#if CONFIG_SW_COEXIST_ENABLE
return coex_register_wifi_channel_change_callback(cb);
#else
- return 0;
+ return -1;
#endif
}
@@ -1328,7 +1328,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
if (btdm_dram_available_region[0].mode == ESP_BT_MODE_IDLE) {
return ESP_ERR_INVALID_STATE;
}
-
+
osi_funcs_p = (struct osi_funcs_t *)malloc_internal_wrapper(sizeof(struct osi_funcs_t));
if (osi_funcs_p == NULL) {
return ESP_ERR_NO_MEM;
@blueMoods this appears to have resolved the issue for me
@blueMoods the patch fixes the bug, would the proposed fix be added to IDF 4.3?
Just hit the same issue. Looks like the fix is not on IDF 4.2. Is it pushed somewhere yet ?
Edit: the fix is in 4.1 (commit https://github.com/espressif/esp-idf/commit/69084bafec28313c89a27caaa6607e8afed87843)
Module or chip used: ESP32-WROVER-B
Board type: Custom PCB
IDF version: v4.1.1
ToolChain : esp-2020r3
Build System: CMake
Operating System: Windows
(Windows only) environment type: VisualGDB
Problem Description: GATT server example code crashes continuously due to assertation failure in the WiFi/BT Co-existence.
Steps to reproduce Just flash the GATT server demo example with the SDK config attached.
Here's the log :
Obviously, there is an issue with the BT/WiFi coexistence, but as the demo example is for BT functionality only coexistence wouldn't make sense to be enabled.
Any help is appreciated..