mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
docs(ble): add flow diagrams to bluedroid BLE examples
(cherry picked from commit 051077835c)
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
This commit is contained in:
@@ -6,6 +6,49 @@
|
||||
This is the demo used to test the BLE throughput, this demo should used with throughput server demo together.
|
||||
The throughput of BLE can up to 720-767 Kbps between to ESP32 board.
|
||||
|
||||
## Flow Diagram
|
||||
|
||||
```
|
||||
┌──────────────┐ ┌──────────────┐
|
||||
│ Throughput │ │ Throughput │
|
||||
│ Client │ │ Server │
|
||||
└──────┬───────┘ └──────┬───────┘
|
||||
│ │
|
||||
│ ─────────── Connection Setup ─────────── │
|
||||
│ │
|
||||
│ 1. Scan for "THROUGHPUT_DEMO" │ Advertising
|
||||
│ ───────────────────────────────────────────────> │
|
||||
│ │
|
||||
│ 2. Connect │
|
||||
│ ───────────────────────────────────────────────> │
|
||||
│ │
|
||||
│ 3. MTU Exchange (517 bytes) │
|
||||
│ <────────────────────────────────────────────────>│
|
||||
│ │
|
||||
│ 4. Enable Notification │
|
||||
│ ───────────────────────────────────────────────> │
|
||||
│ │
|
||||
│ ─────────── Throughput Test ─────────── │
|
||||
│ │
|
||||
│ Mode 1: Notify Test (Server → Client) │
|
||||
│ <═══════════════════════════════════════════════ │
|
||||
│ Continuous notifications (514 bytes/packet) │
|
||||
│ │
|
||||
│ Mode 2: Write Test (Client → Server) │
|
||||
│ ═══════════════════════════════════════════════> │
|
||||
│ Continuous writes (514 bytes/packet) │
|
||||
│ │
|
||||
│ ─────────── Statistics ─────────── │
|
||||
│ │
|
||||
│ Calculate: Bytes/s, bits/s │
|
||||
│ Expected: 600-767 Kbps │
|
||||
│ │
|
||||
┌──────┴───────┐ ┌──────┴───────┐
|
||||
│ Throughput │ │ Throughput │
|
||||
│ Client │ │ Server │
|
||||
└──────────────┘ └──────────────┘
|
||||
```
|
||||
|
||||
## How to Use Example
|
||||
|
||||
Before project configuration and build, be sure to set the correct chip target using:
|
||||
|
||||
@@ -6,6 +6,48 @@
|
||||
This is the demo used to test the BLE throughput, this demo should used with throughput client demo together.
|
||||
The throughput of BLE can up to 720-767 Kbps between to ESP32 board.
|
||||
|
||||
## Flow Diagram
|
||||
|
||||
```
|
||||
┌──────────────────┐ ┌──────────────────┐
|
||||
│ Throughput Server│ │ Throughput Client│
|
||||
│ (this example) │ │ │
|
||||
└────────┬─────────┘ └────────┬─────────┘
|
||||
│ │
|
||||
│ 1. Initialize BLE │
|
||||
│ 2. Create GATT Service │
|
||||
│ 3. Add Characteristic (Notify) │
|
||||
│ 4. Start Advertising │
|
||||
│ │
|
||||
│ ─────────── Connection Setup ─────────── │
|
||||
│ │
|
||||
│ Connection Request │
|
||||
│ <════════════════════════════════════════════│
|
||||
│ │
|
||||
│ 5. Accept Connection │
|
||||
│ │
|
||||
│ MTU Exchange (517 bytes) │
|
||||
│ <═══════════════════════════════════════════>│
|
||||
│ │
|
||||
│ Enable Notification │
|
||||
│ <════════════════════════════════════════════│
|
||||
│ │
|
||||
│ ─────────── Throughput Test ─────────── │
|
||||
│ │
|
||||
│ Notification Data (large packets) │
|
||||
│ ════════════════════════════════════════════>│
|
||||
│ Notification Data (large packets) │
|
||||
│ ════════════════════════════════════════════>│
|
||||
│ ... (continuous data stream) ... │
|
||||
│ ════════════════════════════════════════════>│
|
||||
│ │ Calculate
|
||||
│ │ Throughput
|
||||
│ │
|
||||
┌────────┴─────────┐ ┌────────┴─────────┐
|
||||
│ Throughput Server│ │ Throughput Client│
|
||||
└──────────────────┘ └──────────────────┘
|
||||
```
|
||||
|
||||
## How to Use Example
|
||||
|
||||
Before project configuration and build, be sure to set the correct chip target using:
|
||||
|
||||
Reference in New Issue
Block a user