Bluetooth® Device APIs
Overview
Bluetooth device reference APIs.
API Reference
Header File
Functions
-
const uint8_t *esp_bt_dev_get_address(void)
Get bluetooth device address. Must use after “esp_bluedroid_enable”.
- Returns
bluetooth device address (six bytes), or NULL if bluetooth stack is not enabled
-
esp_err_t esp_bt_dev_set_device_name(const char *name)
Set bluetooth device name. This function should be called after esp_bluedroid_enable() completes successfully.
A BR/EDR/LE device type shall have a single Bluetooth device name which shall be identical irrespective of the physical channel used to perform the name discovery procedure.
- Parameters
name – [in] : device name to be set
- Returns
ESP_OK : Succeed
ESP_ERR_INVALID_ARG : if name is NULL pointer or empty, or string length out of limit
ESP_ERR_INVALID_STATE : if bluetooth stack is not yet enabled
ESP_FAIL : others
-
esp_err_t esp_bt_dev_coex_status_config(esp_bt_dev_coex_type_t type, esp_bt_dev_coex_op_t op, uint8_t status)
Config bluetooth device coexis status. This function should be called after esp_bluedroid_enable() completes successfully.
- Parameters
type – [in] : coexist type to operate on
op – [in] : clear or set coexist status
status – [in] : coexist status to be configured
- Returns
ESP_OK : Succeed
ESP_ERR_INVALID_ARG : if name is NULL pointer or empty, or string length out of limit
ESP_ERR_INVALID_STATE : if bluetooth stack is not yet enabled
ESP_FAIL : others
Macros
-
ESP_BT_DEV_COEX_BLE_ST_MESH_CONFIG
-
ESP_BT_DEV_COEX_BLE_ST_MESH_TRAFFIC
-
ESP_BT_DEV_COEX_BLE_ST_MESH_STANDBY
-
ESP_BT_DEV_COEX_BT_ST_A2DP_STREAMING
-
ESP_BT_DEV_COEX_BT_ST_A2DP_PAUSED
-
ESP_BT_DEV_COEX_OP_CLEAR
-
ESP_BT_DEV_COEX_OP_SET
Type Definitions
-
typedef uint8_t esp_bt_dev_coex_op_t