2019-05-15 09:05:44 -04:00
|
|
|
|
蓝牙 API
|
|
|
|
|
*************
|
|
|
|
|
|
|
|
|
|
:link_to_translation:`en:[English]`
|
|
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
|
:maxdepth: 2
|
|
|
|
|
|
2021-12-30 05:50:55 -05:00
|
|
|
|
bt_common
|
|
|
|
|
bt_le
|
2022-07-25 02:02:07 -04:00
|
|
|
|
:SOC_BT_CLASSIC_SUPPORTED: classic_bt
|
2021-12-30 05:50:55 -05:00
|
|
|
|
controller_vhci
|
2022-08-11 05:21:27 -04:00
|
|
|
|
:SOC_BLE_MESH_SUPPORTED: esp-ble-mesh
|
2021-12-30 05:50:55 -05:00
|
|
|
|
nimble/index
|
|
|
|
|
|
|
|
|
|
ESP-IDF 目前支持两个主机堆栈。基于 Bluedroid 的堆栈(默认)支持传统蓝牙和 BLE,而基于 Apache NimBLE 的堆栈仅支持 BLE。用户可参考如下信息进行选择:
|
|
|
|
|
|
|
|
|
|
* 对于同时涉及传统蓝牙和 BLE 的用例,应该选用 Bluedroid。
|
|
|
|
|
* 对于仅涉及 BLE 的用例,建议选用 NimBLE。在代码占用和运行时,NimBLE 对内存的要求较低,因此适用于此类场景。
|
2019-05-15 09:05:44 -04:00
|
|
|
|
|
2021-10-27 03:27:27 -04:00
|
|
|
|
.. only:: esp32
|
2019-05-15 09:05:44 -04:00
|
|
|
|
|
2021-12-30 05:50:55 -05:00
|
|
|
|
请点击下方链接,查看 ESP32 蓝牙架构:
|
2021-10-27 03:27:27 -04:00
|
|
|
|
|
2022-04-28 02:34:20 -04:00
|
|
|
|
* `ESP32 蓝牙架构 (PDF) <https://espressif.com/sites/default/files/documentation/esp32_bluetooth_architecture_cn.pdf>`_
|
2019-05-15 09:05:44 -04:00
|
|
|
|
|
2021-12-30 05:50:55 -05:00
|
|
|
|
蓝牙 API 的示例代码存放于 ESP-IDF 示例项目的 :example:`bluetooth/bluedroid` 目录下。
|
2019-05-15 09:05:44 -04:00
|
|
|
|
|
|
|
|
|
下面的示例给出了详细介绍:
|
|
|
|
|
|
2019-07-01 07:21:57 -04:00
|
|
|
|
* :example_file:`GATT 客户端示例 <bluetooth/bluedroid/ble/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md>`
|
|
|
|
|
* :example_file:`GATT 服务端服务表格示例 <bluetooth/bluedroid/ble/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md>`
|
|
|
|
|
* :example_file:`GATT 服务端示例 <bluetooth/bluedroid/ble/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md>`
|
|
|
|
|
* :example_file:`GATT 客户端安全性示例 <bluetooth/bluedroid/ble/gatt_security_client/tutorial/Gatt_Security_Client_Example_Walkthrough.md>`
|
|
|
|
|
* :example_file:`GATT 服务端安全性示例 <bluetooth/bluedroid/ble/gatt_security_server/tutorial/Gatt_Security_Server_Example_Walkthrough.md>`
|
|
|
|
|
* :example_file:`GATT 客户端多连接示例 <bluetooth/bluedroid/ble/gattc_multi_connect/tutorial/Gatt_Client_Multi_Connection_Example_Walkthrough.md>`
|