Back to Esp Idf

ESP-IDF BLE Compatibility Test Example

examples/bluetooth/bluedroid/ble/ble_compatibility_test/README.md

6.1-dev5.6 KB
Original Source
Supported TargetsESP32ESP32-C2ESP32-C3ESP32-C5ESP32-C6ESP32-C61ESP32-H2ESP32-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:

bash
idf.py set-target <chip_name>

Test Scenario

  • ESP32 Module: ESP32-WROOM-32x
  • IDF version: 7c29a39d6f9f2dfbefc49d34d34e9267afc7200d
  • Test case
  • Test APK: LightBlue V1.1.3
  • Test report

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.