docs(ble): created an independent entry for classic bt

This commit is contained in:
Yuhan Wei
2024-07-24 22:28:24 +08:00
committed by Wei Yu Han
parent 28160ef5d6
commit 4b32ffb8a9
9 changed files with 233 additions and 3 deletions

View File

@@ -41,7 +41,9 @@ BLE_MESH_DOCS = ['api-guides/esp-ble-mesh/ble-mesh-index.rst',
'api-guides/esp-ble-mesh/ble-mesh-faq.rst',
'api-reference/bluetooth/esp-ble-mesh.rst']
CLASSIC_BT_DOCS = ['api-reference/bluetooth/classic_bt.rst',
CLASSIC_BT_DOCS = ['api-guides/classic-bt/index.rst',
'api-guides/classic-bt/overview.rst',
'api-reference/bluetooth/classic_bt.rst',
'api-reference/bluetooth/esp_a2dp.rst',
'api-reference/bluetooth/esp_avrc.rst',
'api-reference/bluetooth/esp_hidd.rst',

View File

@@ -143,8 +143,15 @@ ESP-Bluedroid is a modified version of the native Android Bluetooth stack, Blued
- :doc:`../../api-reference/bluetooth/bt_common`
- :doc:`Bluetooth LE <../../api-reference/bluetooth/bt_le>`
- :example:`Application examples <bluetooth/bluedroid>`
.. only:: esp32
- :example:`Bluetooth LE 4.2 Application Examples <bluetooth/bluedroid/ble>`
.. only:: not esp32
- :example:`Bluetooth LE 4.2 Application Examples <bluetooth/bluedroid/ble>`
- :example:`Bluetooth LE 5.0 Application Examples <bluetooth/bluedroid/ble_50>`
ESP-NimBLE
^^^^^^^^^^

View File

@@ -0,0 +1,13 @@
#######################
Classic Bluetooth®
#######################
:link_to_translation:`zh_CN:[中文]`
*********
Overview
*********
.. toctree::
:maxdepth: 1
overview

View File

@@ -0,0 +1,93 @@
Introduction
=============
:link_to_translation:`zh_CN:[中文]`
This document provides an architecture overview of the Classic Bluetooth stack in ESP-IDF and some quick links to related documents and application examples.
.. only:: esp32
{IDF_TARGET_NAME} supports Dual-Mode Bluetooth 4.2.
The Classic Bluetooth stack in ESP-IDF is a layered architecture that enables Bluetooth functionality on {IDF_TARGET_NAME} chip series. The table below shows its architecture.
.. only:: esp32
.. figure:: ../../../_static/bluetooth-architecture-no-ble-mesh.png
:align: center
:scale: 90%
:alt: {IDF_TARGET_NAME} Classic Bluetooth Stack Architecture
{IDF_TARGET_NAME} Classic Bluetooth Stack Architecture
The table below shows whether the Classic Bluetooth modules are supported in a specific chip series.
.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
* - Chip Series
- Controller
- ESP-Bluedroid
* - ESP32
- Y
- Y
* - ESP32-S2
- \
- \
* - ESP32-S3
- \
- \
* - ESP32-C2
- \
- \
* - ESP32-C3
- \-
- \-
* - ESP32-C6
- \-
- \-
* - ESP32-H2
- \-
- \-
The following sections briefly describe each layer and provide quick links to the related documents and application examples.
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>`
- :example:`Application examples <bluetooth/hci/controller_hci_uart_esp32>`
Hosts
-----
There are one host, ESP-Bluedroid, supporting Classic Bluetooth in IDF.
ESP-Bluedroid
^^^^^^^^^^^^^
ESP-Bluedroid is a modified version of the native Android Bluetooth stack, Bluedroid. It consists of two layers: the Bluetooth Upper Layer (BTU) and the Bluetooth Transport Controller layer (BTC). The BTU layer is responsible for processing bottom layer Bluetooth protocols such as L2CAP, GATT/ATT, SMP, GAP, and other profiles. The BTU layer provides an interface prefixed with "bta". The BTC layer is mainly responsible for providing a supported interface, prefixed with "esp", to the application layer, processing GATT-based profiles and handling miscellaneous tasks. All the APIs are located in the ESP_API layer. Developers should use the Bluetooth APIs prefixed with "esp".
- API references
- :doc:`../../api-reference/bluetooth/bt_common`
- :doc:`../../api-reference/bluetooth/classic_bt`
- :example:`Application examples <bluetooth/bluedroid/classic_bt>`
Profiles
--------
Above the host stacks are the profile implementations by Espressif and some common profiles. Depending on your configuration, these profiles can run on ESP-Bluedroid.
Applications
------------
At the uppermost layer are applications. You can build your own applications on top of the ESP-Bluedroid stacks, leveraging the provided APIs and profiles to create Classic Bluetooth applications tailored to specific use cases.

View File

@@ -7,6 +7,7 @@ API Guides
app_trace
startup
:SOC_BT_CLASSIC_SUPPORTED: classic-bt/index
:SOC_BLE_SUPPORTED: ble/index
:SOC_BLE_MESH_SUPPORTED: esp-ble-mesh/ble-mesh-index
bootloader

View File

@@ -143,8 +143,15 @@ ESP-Bluedroid 是原生 Android 蓝牙协议栈 Bluedroid 的修改版,由两
- :doc:`../../api-reference/bluetooth/bt_common`
- :doc:`低功耗蓝牙 <../../api-reference/bluetooth/bt_le>`
- :example:`应用程序示例 <bluetooth/bluedroid>`
.. only:: esp32
- :example:`低功耗蓝牙 4.2 应用程序示例 <bluetooth/bluedroid/ble>`
.. only:: not esp32
- :example:`低功耗蓝牙 4.2 应用程序示例 <bluetooth/bluedroid/ble>`
- :example:`低功耗蓝牙 5.0 应用程序示例 <bluetooth/bluedroid/ble_50>`
ESP-NimBLE
^^^^^^^^^^

View File

@@ -0,0 +1,13 @@
###########
经典蓝牙®
###########
:link_to_translation:`en:[English]`
*****
概览
*****
.. toctree::
:maxdepth: 1
overview

View File

@@ -0,0 +1,93 @@
介绍
------
:link_to_translation:`en:[English]`
此文档概述了 ESP-IDF 中经典蓝牙协议栈的架构,并提供了一些相关文档和应用示例的快速链接。
.. only:: esp32
{IDF_TARGET_NAME} 支持双模蓝牙 4.2,并且已经获得双模蓝牙 4.2 认证。
ESP-IDF 中的经典蓝牙协议栈是一个分层架构,可在 {IDF_TARGET_NAME} 系列芯片上实现经典蓝牙功能,详见下。
.. only:: esp32
.. figure:: ../../../_static/bluetooth-architecture-no-ble-mesh.png
:align: center
:scale: 90%
:alt: {IDF_TARGET_NAME} 经典蓝牙协议栈架构
{IDF_TARGET_NAME} 经典蓝牙协议栈架构
参考下表可知特定芯片是否支持经典蓝牙模块。
.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
* - 芯片系列
- 控制器
- ESP-Bluedroid
* - ESP32
- Y
- Y
* - ESP32-S2
- \
- \
* - ESP32-S3
- \
- \
* - ESP32-C2
- \-
- \-
* - ESP32-C3
- \-
- \-
* - ESP32-C6
- \-
- \-
* - ESP32-H2
- \-
- \-
以下各节简要介绍了每个层,并提供了相关文档和应用示例的快速链接。
ESP 蓝牙控制器
--------------
底层为 ESP 蓝牙控制器,包含 PHY、基带、链路控制器、链路管理器、设备管理器和 HCI 等各种模块。该层管理硬件接口和链路,以库的形式提供功能,并通过 API 访问,且直接与硬件和低级别蓝牙协议交互。
- :doc:`API 参考 <../../api-reference/bluetooth/controller_vhci>`
- :example:`应用示例 <bluetooth/hci/controller_hci_uart_esp32>`
ESP 蓝牙主机
-------------
IDF 中的ESP-Bluedroid 主机支持经典蓝牙。
ESP-Bluedroid
^^^^^^^^^^^^^
ESP-Bluedroid 是原生 Android 蓝牙协议栈 Bluedroid 的修改版,由两层组成:蓝牙上层 (BTU) 和蓝牙传输控制器层 (BTC)。BTU 层负责处理 L2CAP、GATT/ATT、SMP、GAP 等底层蓝牙协议以及其他配置文件,提供以 "bta" 为前缀的接口。BTC 层主要负责向应用层提供以 "esp" 为前缀的支持接口,并处理基于 GATT 的配置文件以及其他任务。所有的 API 都位于 ESP_API 层,开发者应使用以 "esp" 为前缀的蓝牙 API。
- API 参考
- :doc:`../../api-reference/bluetooth/bt_common`
- :doc:`经典蓝牙 <../../api-reference/bluetooth/classic_bt>`
- :example:`应用程序示例 <bluetooth/bluedroid/classic_bt>`
蓝牙规范
--------
主机协议层之上是 Espressif 的蓝牙规范和一些常见的蓝牙规范。根据具体配置,这些规范可以在 ESP-Bluedroid 上运行。
应用
----
最上层是应用层。利用上述 API 和蓝牙规范,可以在 ESP-Bluedroid 协议栈之上创建特定用例的经典蓝牙应用程序。

View File

@@ -7,6 +7,7 @@ API 指南
app_trace
startup
:SOC_BT_CLASSIC_SUPPORTED: classic-bt/index
:SOC_BLE_SUPPORTED: ble/index
:SOC_BLE_MESH_SUPPORTED: esp-ble-mesh/ble-mesh-index
bootloader