BT 设备 API

概述

蓝牙设备参考 API。

Instructions

应用程序示例

Instructions

API 参考手册

类型定义

枚举

结构体

函数

const uint8_t *esp_bt_dev_get_address(void)

Get bluetooth device address. Must use after “esp_bluedroid_enable”.

Return
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.

Return
  • ESP_OK : Succeed
  • ESP_ERR_INVALID_ARG : if name is NULL pointer or empty, or string length out of limit
  • ESP_INVALID_STATE : if bluetooth stack is not yet enabled
  • ESP_FAIL : others
Parameters
  • name: : device name to be set