esp_bt_controller_enable() function
Enable Bluetooth Controller For API compatibility, retain this argument. This mode must match the mode specified in the `cfg` of `esp_bt_controller_init()`.
Arguments
mode
The Bluetooth Controller mode (BLE/Classic Bluetooth/BTDM) to enable
Return value
- ESP_OK: Success - ESP_ERR_INVALID_STATE: Invalid Bluetooth Controller state - ESP_ERR_INVALID_ARG: Invalid arguments
Notes
1. Bluetooth Controller cannot be enabled in `ESP_BT_CONTROLLER_STATUS_IDLE` status. It has to be initialized first. 2. Due to a known issue, you cannot call `esp_bt_controller_enable()` for the second time to change the Controller mode dynamically. To change the Controller mode, call `esp_bt_controller_disable()` and then call `esp_bt_controller_enable()` with the new mode.
![]()
ret = esp_bt_controller_enable(ESP_BT_MODE_BTDM);
esp_bt_controller_enable() is called by 3 functions and calls 15 functions:
![]()
esp_bt_controller_enable()
esp_bt_controller_enable() reads 13 variables and writes 1 variable:
![]()
esp_bt_controller_enable()