Bluetooth Commonο
Exampleο
The target-specific HCI-over-UART controller examples have been replaced by a single example, bluetooth/hci/controller_hci_uart, which supports all targets that provide HCI over UART:
Removed example
Targets it used to cover
examples/bluetooth/hci/controller_hci_uart_esp32ESP32
examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3ESP32-C3, ESP32-S3
examples/bluetooth/nimble/hciESP32-C2, ESP32-C5, ESP32-C6, ESP32-C61, ESP32-H2, ESP32-H21, ESP32-H4, ESP32-S31
Each removed directory keeps only a
README.mdthat points to the new example. Select the target withidf.py set-target <target>. The HCI UART pins, baud rate, and hardware flow control settings default to the values used by the removed examples, so no rewiring is required.The unified example relies on the Bluetooth controller to provide the HCI UART transport. Applications derived from the removed examples must therefore be updated accordingly:
The UHCI-based HCI UART transport is now provided by the controller instead of the application. The new option makes
esp_bt_controller_init()install the transport and fill inesp_bt_controller_config_t::hci_tl_funcsusing the settings configured under theHCI UART(H4) Optionsmenu, including , , , and the TX, RX, RTS, and CTS pins.Applications derived from
controller_hci_uart_esp32c3_and_esp32s3previously implemented this transport using LL and register access in their own source files. Remove this code and enable instead.When is selected,
esp_bt_controller_init()requires eitheresp_bt_controller_config_t::hci_tl_funcsto be provided or to be enabled. Otherwise, it reports the missing transport and returnsESP_ERR_INVALID_ARG.For Direct Test Mode, configures the HCI UART without hardware flow control. The new function
esp_bt_hci_uart_reconfig_pin(), declared in /bt/include/esp32c3/include/esp_bt.h, can be used to change the TX and RX pins at runtime.