Files
esp-idf/examples/bluetooth/bluedroid/ble/ble_compatibility_test/README.md
T
2026-04-02 14:59:40 +08:00

5.6 KiB

Supported Targets ESP32 ESP32-C2 ESP32-C3 ESP32-C5 ESP32-C6 ESP32-C61 ESP32-H2 ESP32-H4 ESP32-S3

ESP-IDF BLE Compatibility Test Example

This example is to test the Bluetooth compatibility and mobile phones.

Flow Diagram

    ┌──────────────────┐                           ┌──────────────────┐
    │    ESP32 BLE     │                           │   Mobile Phone   │
    │ (Compatibility)  │                           │  (LightBlue App) │
    └────────┬─────────┘                           └────────┬─────────┘
             │                                              │
             │  1. Initialize BLE                           │
             │  2. Create GATT Services                     │
             │  3. Start Advertising                        │
             │                                              │
             │  ─────────── Test Scenarios ───────────      │
             │                                              │
             │         Scan & Discover                      │
             │ <════════════════════════════════════════════│
             │                                              │
             │         Connection Request                   │
             │ <════════════════════════════════════════════│
             │                                              │
             │         Service Discovery                    │
             │ <════════════════════════════════════════════│
             │                                              │
             │         Read Characteristic                  │
             │ <════════════════════════════════════════════│
             │         Read Response                        │
             │ ════════════════════════════════════════════>│
             │                                              │
             │         Write Characteristic                 │
             │ <════════════════════════════════════════════│
             │         Write Confirmation                   │
             │ ════════════════════════════════════════════>│
             │                                              │
             │         Enable Notification                  │
             │ <════════════════════════════════════════════│
             │         Notification Data                    │
             │ ════════════════════════════════════════════>│
             │                                              │
             │         Disconnection                        │
             │ <═══════════════════════════════════════════>│
             │                                              │
    ┌────────┴─────────┐                           ┌────────┴─────────┐
    │    ESP32 BLE     │                           │   Mobile Phone   │
    └──────────────────┘                           └──────────────────┘

How to Use Example

Before project configuration and build, be sure to set the correct chip target using:

idf.py set-target <chip_name>

Test Scenario

Hardware Required

  • A development board with ESP32/ESP32-C3/ESP32-C2/ESP32-H2/ESP32-S3 SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.)
  • A USB cable for Power supply and programming

See Development Boards for more information about it.

Build and Flash

Run idf.py -p PORT flash monitor to build, flash and monitor the project.

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.

Troubleshooting

For any technical queries, please open an issue on GitHub. We will get back to you soon.