docs(ble): Reorganized the bluetooth API guide structure

This commit is contained in:
Yuhan Wei 2024-07-15 19:41:43 +08:00 committed by Wei Yu Han
parent d2cb23c28a
commit e4b3fe2f46
7 changed files with 81 additions and 37 deletions

View File

@ -17,20 +17,24 @@ if os.environ.get('IDF_PATH') is None:
raise RuntimeError('IDF_PATH should be set, run export.sh before building docs')
BT_DOCS = ['api-guides/bluetooth.rst',
'api-reference/bluetooth/bt_le.rst',
'api-guides/bluetooth/index.rst',
'api-guides/bluetooth/bluetooth.rst',
'api-reference/bluetooth/esp_bt_defs.rst',
'api-reference/bluetooth/esp_bt_device.rst',
'api-reference/bluetooth/esp_bt_main.rst',
'api-reference/bluetooth/bt_common.rst',
'api-reference/bluetooth/controller_vhci.rst',
'api-reference/bluetooth/esp_gap_ble.rst',
'api-reference/bluetooth/esp_gatt_defs.rst',
'api-reference/bluetooth/esp_gatts.rst',
'api-reference/bluetooth/esp_gattc.rst',
'api-reference/bluetooth/index.rst',
'api-reference/bluetooth/nimble/index.rst']
'api-reference/bluetooth/index.rst']
BLE_DOCS = ['api-reference/bluetooth/bt_le.rst',
'api-guides/bluetooth/ble/ble-feature-support-status.rst',
'api-reference/bluetooth/esp_gap_ble.rst',
'api-reference/bluetooth/esp_gatt_defs.rst',
'api-reference/bluetooth/esp_gatts.rst',
'api-reference/bluetooth/esp_gattc.rst',
'api-reference/bluetooth/nimble/index.rst',
'migration-guides/release-5.x/5.0/bluetooth-low-energy.rst']
BLE_DOCS = ['migration-guides/release-5.x/5.0/bluetooth-low-energy.rst']
BLE_MESH_DOCS = ['api-guides/esp-ble-mesh/ble-mesh-index.rst',
'api-guides/esp-ble-mesh/ble-mesh-feature-list.rst',

View File

@ -1,5 +1,5 @@
Bluetooth® Overview
===================
Introduction
------------
:link_to_translation:`zh_CN:[中文]`
@ -21,7 +21,7 @@ The Bluetooth stack in ESP-IDF is a layered architecture that enables Bluetooth
.. only:: esp32 or esp32s3 or esp32c3 or esp32c6
.. figure:: ../../_static/bluetooth-architecture.png
.. figure:: ../../../_static/bluetooth-architecture.png
:align: center
:scale: 90%
:alt: {IDF_TARGET_NAME} Bluetooth Stack Architecture
@ -30,7 +30,7 @@ The Bluetooth stack in ESP-IDF is a layered architecture that enables Bluetooth
.. only:: esp32c2
.. figure:: ../../_static/bluetooth-architecture-no-ble-mesh.png
.. figure:: ../../../_static/bluetooth-architecture-no-ble-mesh.png
:align: center
:scale: 90%
:alt: {IDF_TARGET_NAME} Bluetooth Stack Architecture
@ -39,7 +39,7 @@ The Bluetooth stack in ESP-IDF is a layered architecture that enables Bluetooth
.. only:: esp32h2
.. figure:: ../../_static/bluetooth-architecture-no-blufi.png
.. figure:: ../../../_static/bluetooth-architecture-no-blufi.png
:align: center
:scale: 90%
:alt: {IDF_TARGET_NAME} Bluetooth Stack Architecture
@ -110,7 +110,7 @@ ESP Bluetooth Controller
At the bottom layer is ESP Bluetooth Controller, which encompasses various modules such as PHY, Baseband, Link Controller, Link Manager, Device Manager, and HCI. It handles hardware interface management and link management. It provides functions in the form of libraries and is accessible through APIs. This layer directly interacts with the hardware and low-level Bluetooth protocols.
- :doc:`API reference <../api-reference/bluetooth/controller_vhci>`
- :doc:`API reference <../../api-reference/bluetooth/controller_vhci>`
- :example:`Application examples <bluetooth/hci>`
@ -141,12 +141,12 @@ ESP-Bluedroid is a modified version of the native Android Bluetooth stack, Blued
- API references
- :doc:`../api-reference/bluetooth/bt_common`
- :doc:`Bluetooth LE <../api-reference/bluetooth/bt_le>`
- :doc:`../../api-reference/bluetooth/bt_common`
- :doc:`Bluetooth LE <../../api-reference/bluetooth/bt_le>`
.. only:: esp32
- :doc:`../api-reference/bluetooth/classic_bt`
- :doc:`../../api-reference/bluetooth/classic_bt`
- :example:`Application examples <bluetooth/bluedroid>`
@ -162,7 +162,7 @@ ESP-NimBLE supports Bluetooth LE only. Classic Bluetooth is not supported.
- API references
- `NimBLE API references <https://mynewt.apache.org/latest/network/ble_hs/ble_hs.html>`__
- :doc:`ESP-NimBLE API references for initialization <../api-reference/bluetooth/nimble/index>`
- :doc:`ESP-NimBLE API references for initialization <../../api-reference/bluetooth/nimble/index>`
- :example:`Application examples <bluetooth/nimble>`
@ -180,7 +180,7 @@ Above the host stacks are the profile implementations by Espressif and some comm
Built on top of Zephyr Bluetooth Mesh stack, the ESP-BLE-MESH implementation supports device provisioning and node control. It also supports such node features as Proxy, Relay, Low power and Friend.
- :doc:`ESP-BLE-MESH documentation <esp-ble-mesh/ble-mesh-index>`: feature list, get started, architecture, description of application examples, frequently asked questions, etc.
- :doc:`ESP-BLE-MESH documentation <../esp-ble-mesh/ble-mesh-index>`: feature list, get started, architecture, description of application examples, frequently asked questions, etc.
- :example:`Application examples <bluetooth/esp_ble_mesh>`
@ -191,7 +191,7 @@ Above the host stacks are the profile implementations by Espressif and some comm
The BluFi for {IDF_TARGET_NAME} is a Wi-Fi network configuration function via Bluetooth channel. It provides a secure protocol to pass Wi-Fi configuration and credentials to {IDF_TARGET_NAME}. Using this information, {IDF_TARGET_NAME} can then connect to an AP or establish a softAP.
- :doc:`BluFi documentation <blufi>`
- :doc:`BluFi documentation <../blufi>`
- :example:`Application examples <bluetooth/blufi>`

View File

@ -0,0 +1,20 @@
Bluetooth®
============
:link_to_translation:`zh_CN:[中文]`
Overview
--------
.. toctree::
:maxdepth: 1
bluetooth
.. .. only:: SOC_BLE_SUPPORTED
.. Bluetooth® Low Energy (Bluetooth LE)
.. ------------------------------------
.. .. toctree::
.. :maxdepth: 2
.. ble/ble-feature-support-status

View File

@ -8,7 +8,7 @@ API Guides
app_trace
startup
:SOC_BLUFI_SUPPORTED: blufi
:SOC_BT_SUPPORTED: bluetooth
:SOC_BT_SUPPORTED: bluetooth/index
bootloader
build-system
:SOC_SUPPORT_COEXISTENCE: coexist

View File

@ -1,5 +1,5 @@
蓝牙®概述
=========
介绍
------
:link_to_translation:`en:[English]`
@ -21,7 +21,7 @@ ESP-IDF 中的蓝牙协议栈是一个分层架构,可在 {IDF_TARGET_NAME}
.. only:: esp32 or esp32s3 or esp32c3 or esp32c6
.. figure:: ../../_static/bluetooth-architecture.png
.. figure:: ../../../_static/bluetooth-architecture.png
:align: center
:scale: 90%
:alt: {IDF_TARGET_NAME} 蓝牙协议栈架构
@ -30,7 +30,7 @@ ESP-IDF 中的蓝牙协议栈是一个分层架构,可在 {IDF_TARGET_NAME}
.. only:: esp32c2
.. figure:: ../../_static/bluetooth-architecture-no-ble-mesh.png
.. figure:: ../../../_static/bluetooth-architecture-no-ble-mesh.png
:align: center
:scale: 90%
:alt: {IDF_TARGET_NAME} 蓝牙协议栈架构
@ -39,7 +39,7 @@ ESP-IDF 中的蓝牙协议栈是一个分层架构,可在 {IDF_TARGET_NAME}
.. only:: esp32h2
.. figure:: ../../_static/bluetooth-architecture-no-blufi.png
.. figure:: ../../../_static/bluetooth-architecture-no-blufi.png
:align: center
:scale: 90%
:alt: {IDF_TARGET_NAME} 蓝牙协议栈架构
@ -110,7 +110,7 @@ ESP 蓝牙控制器
底层为 ESP 蓝牙控制器,包含 PHY、基带、链路控制器、链路管理器、设备管理器和 HCI 等各种模块。该层管理硬件接口和链路,以库的形式提供功能,并通过 API 访问,且直接与硬件和低级别蓝牙协议交互。
- :doc:`API 参考 <../api-reference/bluetooth/controller_vhci>`
- :doc:`API 参考 <../../api-reference/bluetooth/controller_vhci>`
- :example:`应用示例 <bluetooth/hci>`
@ -141,12 +141,12 @@ ESP-Bluedroid 是原生 Android 蓝牙协议栈 Bluedroid 的修改版,由两
- API 参考
- :doc:`../api-reference/bluetooth/bt_common`
- :doc:`低功耗蓝牙 <../api-reference/bluetooth/bt_le>`
- :doc:`../../api-reference/bluetooth/bt_common`
- :doc:`低功耗蓝牙 <../../api-reference/bluetooth/bt_le>`
.. only:: esp32
- :doc:`../api-reference/bluetooth/classic_bt`
- :doc:`../../api-reference/bluetooth/classic_bt`
- :example:`应用程序示例 <bluetooth/bluedroid>`
@ -162,15 +162,15 @@ ESP-NimBLE 仅支持低功耗蓝牙,不支持经典蓝牙。
- API 参考
- `NimBLE API 参考 <https://mynewt.apache.org/latest/network/ble_hs/ble_hs.html>`__
- :doc:`ESP-NimBLE 初始化 API 参考 initialization <../api-reference/bluetooth/nimble/index>`
- :doc:`ESP-NimBLE 初始化 API 参考 initialization <../../api-reference/bluetooth/nimble/index>`
- :example:`应用程序示例 <bluetooth/nimble>`
配置文件
蓝牙规范
--------
主机协议层之上是 Espressif 的配置文件实现和一些常见的配置文件。根据具体配置,这些配置文件可以在 ESP-Bluedroid 或 ESP-NimBLE 上运行。
主机协议层之上是 Espressif 的蓝牙规范和一些常见的蓝牙规范。根据具体配置,这些规范可以在 ESP-Bluedroid 或 ESP-NimBLE 上运行。
.. only:: SOC_BLE_MESH_SUPPORTED
@ -180,7 +180,7 @@ ESP-NimBLE 仅支持低功耗蓝牙,不支持经典蓝牙。
ESP-BLE-MESH 基于 Zephyr 蓝牙 Mesh 协议栈,其实现支持设备配网和节点控制,还支持代理、中继、低功耗和朋友等节点功能。
- :doc:`ESP-BLE-MESH 文档 <esp-ble-mesh/ble-mesh-index>`:功能列表、快速入门、架构、应用示例描述、常见问题等。
- :doc:`ESP-BLE-MESH 文档 <../esp-ble-mesh/ble-mesh-index>`:功能列表、快速入门、架构、应用示例描述、常见问题等。
- :example:`应用示例 <bluetooth/esp_ble_mesh>`
@ -191,11 +191,11 @@ ESP-NimBLE 仅支持低功耗蓝牙,不支持经典蓝牙。
{IDF_TARGET_NAME} 的 BluFi 是通过蓝牙信道进行的 Wi-Fi 网络配置功能。BluFi 提供了将 Wi-Fi 配置和凭据传递给 {IDF_TARGET_NAME} 的安全协议,从而使 {IDF_TARGET_NAME} 连接到 AP 或搭建软 AP。
- :doc:`BluFi 文档 <blufi>`
- :doc:`BluFi 文档 <../blufi>`
- :example:`应用示例 <bluetooth/blufi>`
应用
----
最上层是应用层。利用上述 API 和配置文件,可以在 ESP-Bluedroid 和 ESP-NimBLE 协议栈之上创建特定用例的蓝牙应用程序。
最上层是应用层。利用上述 API 和蓝牙规范,可以在 ESP-Bluedroid 和 ESP-NimBLE 协议栈之上创建特定用例的蓝牙应用程序。

View File

@ -0,0 +1,20 @@
蓝牙®
=========
:link_to_translation:`en:[English]`
概述
--------
.. toctree::
:maxdepth: 1
bluetooth
.. .. only:: SOC_BLE_SUPPORTED
.. 低功耗蓝牙®
.. ------------------
.. .. toctree::
.. :maxdepth: 2
.. ble/ble-feature-support-status

View File

@ -8,7 +8,7 @@ API 指南
app_trace
startup
:SOC_BLUFI_SUPPORTED: blufi
:SOC_BT_SUPPORTED: bluetooth
:SOC_BT_SUPPORTED: bluetooth/index
bootloader
build-system
:SOC_SUPPORT_COEXISTENCE: coexist