mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
5.6 KiB
5.6 KiB
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H4 | ESP32-S3 | ESP32-S31 |
|---|
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
- ESP32 Module: ESP32-WROOM-32x
- IDF version:
7c29a39d6f - 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.