diff --git a/components/bt/controller/esp32c3/Kconfig.in b/components/bt/controller/esp32c3/Kconfig.in index 0363a98034..0f5f29ec8f 100644 --- a/components/bt/controller/esp32c3/Kconfig.in +++ b/components/bt/controller/esp32c3/Kconfig.in @@ -66,7 +66,7 @@ endchoice config BT_CTRL_HCI_TL int default 0 if BT_CTRL_HCI_MODE_UART_H4 - default 1 if BT_CTRL_HCI_M0DE_VHCI + default 1 if BT_CTRL_HCI_MODE_VHCI default 1 help HCI mode as VHCI or UART(H4) @@ -448,7 +448,7 @@ config BT_CTRL_SLEEP_CLOCK_EFF config BT_CTRL_HCI_TL_EFF int default 0 if BT_CTRL_HCI_MODE_UART_H4 - default 1 if BT_CTRL_HCI_M0DE_VHCI + default 1 if BT_CTRL_HCI_MODE_VHCI default 1 config BT_CTRL_AGC_RECORRECT_EN diff --git a/components/bt/controller/esp32c3/bt.c b/components/bt/controller/esp32c3/bt.c index 36b4e86637..9ea0b412e9 100644 --- a/components/bt/controller/esp32c3/bt.c +++ b/components/bt/controller/esp32c3/bt.c @@ -301,6 +301,12 @@ extern void r_ble_log_async_select_dump_buffers(uint8_t buffers); extern void r_ble_log_async_output_dump_all(bool output); extern void esp_panic_handler_feed_wdts(void); #endif // CONFIG_BT_CTRL_LE_LOG_EN +#if (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED) +extern void scan_stack_enableAdvFlowCtrlVsCmd(bool en); +extern void adv_stack_enableClearLegacyAdvVsCmd(bool en); +extern void advFilter_stack_enableDupExcListVsCmd(bool en); +extern void chanSel_stack_enableSetCsaVsCmd(bool en); +#endif // (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED) extern uint32_t _bt_bss_start; extern uint32_t _bt_bss_end; @@ -1771,6 +1777,13 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) goto error; } +#if (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED) + scan_stack_enableAdvFlowCtrlVsCmd(true); + adv_stack_enableClearLegacyAdvVsCmd(true); + advFilter_stack_enableDupExcListVsCmd(true); + chanSel_stack_enableSetCsaVsCmd(true); +#endif // (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED) + btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED; return ESP_OK; @@ -1796,6 +1809,13 @@ esp_err_t esp_bt_controller_deinit(void) ble_log_spi_out_deinit(); #endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED +#if (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED) + scan_stack_enableAdvFlowCtrlVsCmd(false); + adv_stack_enableClearLegacyAdvVsCmd(false); + advFilter_stack_enableDupExcListVsCmd(false); + chanSel_stack_enableSetCsaVsCmd(false); +#endif // (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED) + btdm_controller_deinit(); bt_controller_deinit_internal(); diff --git a/components/bt/controller/lib_esp32c3_family b/components/bt/controller/lib_esp32c3_family index b5ead6b6d5..d2414a5dd9 160000 --- a/components/bt/controller/lib_esp32c3_family +++ b/components/bt/controller/lib_esp32c3_family @@ -1 +1 @@ -Subproject commit b5ead6b6d5758629370c91897168b8bcdfdcc169 +Subproject commit d2414a5dd958b32ca53382b441d24d97a0345a55 diff --git a/examples/bluetooth/hci/controller_hci_uart_esp32/sdkconfig.defaults b/examples/bluetooth/hci/controller_hci_uart_esp32/sdkconfig.defaults index f1a0c525ab..4619b9cd54 100644 --- a/examples/bluetooth/hci/controller_hci_uart_esp32/sdkconfig.defaults +++ b/examples/bluetooth/hci/controller_hci_uart_esp32/sdkconfig.defaults @@ -17,3 +17,5 @@ CONFIG_BTDM_CTRL_HCI_MODE_UART_H4=y CONFIG_BTDM_CTRL_HCI_UART_NO=1 CONFIG_BTDM_CTRL_HCI_UART_BAUDRATE=921600 CONFIG_BTDM_CTRL_MODEM_SLEEP=n +CONFIG_BT_CONTROLLER_ONLY=y +CONFIG_BT_CONTROLLER_ENABLED=y diff --git a/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/sdkconfig.defaults b/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/sdkconfig.defaults index 918faa8a0b..4cb59ea3c3 100644 --- a/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/sdkconfig.defaults +++ b/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/sdkconfig.defaults @@ -8,4 +8,6 @@ CONFIG_BT_CTRL_HCI_MODE_UART_H4=y CONFIG_BT_CTRL_HCI_TL=0 CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP=n CONFIG_BT_CTRL_BLE_SCAN_DUPL=n +CONFIG_BT_CONTROLLER_ONLY=y +CONFIG_BT_CONTROLLER_ENABLED=y # End of deprecated options