# Bluetooth® API

[中文]

This section provides the API reference for Bluetooth components supported in ESP-IDF. ESP-IDF supports two host stacks: Bluedroid and NimBLE.

- Bluedroid (the default stack): Supports both Bluetooth Classic and Bluetooth LE. Recommended for applications that require both technologies.

- NimBLE: A lightweight stack for Bluetooth LE only. Ideal for resource-constrained applications due to smaller code size and memory usage.

Use the navigation links below to explore API documentation and application examples.

Controller Interface API

The low-level interface between the Bluetooth host stack and the controller.

- Controller & HCI

Bluedroid Stack API

The default host stack in ESP-IDF, supporting both Bluetooth Classic and Bluetooth LE.

- Bluetooth® Common
- Bluetooth® Low Energy

For architecture and feature overviews, refer to the following documents in API Guides:

Bluetooth® Architecture, Bluetooth® Low Energy

NimBLE Stack API

A lightweight host stack for Bluetooth LE.

- NimBLE-based Host APIs

For additional details and API reference from the upstream documentation, refer to Apache Mynewt NimBLE User Guide.

ESP-BLE-MESH API

Implements Bluetooth LE Mesh networking.

- ESP-BLE-MESH

## Examples and Tutorials

Explore examples and tutorials in the ESP-IDF examples directory:

- Bluedroid: bluetooth/bluedroid

- NimBLE: bluetooth/nimble

- BLE UART Service (turnkey serial-over-BLE peripheral on top of NimBLE or Bluedroid, exposing the BLE UART Service GATT layout): bluetooth/ble_uart_service

Step-by-step tutorials for developing with the Bluedroid stack:

- GATT Client Example Walkthrough

- GATT Server Service Table Example Walkthrough

- GATT Server Example Walkthrough

- GATT Security Client Example Walkthrough

- GATT Security Server Example Walkthrough

- GATT Client Multi-connection Example Walkthrough

Step-by-step tutorials for developing with the NimBLE stack:

- Bluetooth LE Central Example Walkthrough

- Bluetooth LE Heart Rate Example Walkthrough

- Bluetooth LE Peripheral Example Walkthrough

Was this page helpful?

- Thank you! We received your feedback.
- If you have any comments, fill in Espressif Documentation Feedback Form.

- We value your feedback.
- Let us know how we can improve this page by filling in Espressif Documentation Feedback Form.