examples/bluetooth/bluedroid/ble/ble_spp_server/README.md
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-S3 |
|---|
For description of this application please refer to ESP-IDF GATT CLIENT SPP Example
SPP Server SPP Client
┌───────────┐ ┌───────────┐
│ UART │ │ UART │
│ Terminal │ │ Terminal │
└─────┬─────┘ └─────┬─────┘
│ │
│ ─────────── Initialization ─────────── │
│ │
│ 1. Create SPP Service (UUID: 0xABF0) │
│ 2. Add Characteristics │
│ 3. Start Advertising │
│ │
│ ─────────── Connection ─────────── │
│ │
│ Scan & Connect │
│ <─────────────────────────────────────────────────── │
│ │
│ Connection Established │
│ ─────────────────────────────────────────────────────>│
│ │
│ ─────────── Data Exchange ─────────── │
│ │
│ UART Input ──> Notification (SPP_DATA_NOTIFY_CHAR) │
│ ─────────────────────────────────────────────────────>│──> UART Output
│ │
│ UART Output <── WriteNoRsp (SPP_DATA_RECV_CHAR) │
│ <─────────────────────────────────────────────────── │<── UART Input
│ │
┌─────┴─────┐ ┌─────┴─────┐
│SPP Server │ │ SPP Client│
└───────────┘ └───────────┘
Before project configuration and build, be sure to set the correct chip target using:
idf.py set-target <chip_name>
See Development Boards for more information about it.
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.
I (4452) GATTS_SPP_DEMO: EVT 14, gatts if 3
I (4452) GATTS_SPP_DEMO: event = e
I (5022) GATTS_SPP_DEMO: EVT 4, gatts if 3
I (5022) GATTS_SPP_DEMO: event = 4
I (5152) GATTS_SPP_DEMO: EVT 2, gatts if 3
I (5152) GATTS_SPP_DEMO: event = 2
I (5152) GATTS_SPP_DEMO: ESP_GATTS_WRITE_EVT : handle = 5
I (5242) GATTS_SPP_DEMO: EVT 2, gatts if 3
I (5242) GATTS_SPP_DEMO: event = 2
I (5242) GATTS_SPP_DEMO: ESP_GATTS_WRITE_EVT : handle = 10
I (18462) GATTS_SPP_DEMO: EVT 5, gatts if 3
I (18462) GATTS_SPP_DEMO: event = 5
I (27652) GATTS_SPP_DEMO: EVT 2, gatts if 3
I (27652) GATTS_SPP_DEMO: event = 2
I (27652) GATTS_SPP_DEMO: ESP_GATTS_WRITE_EVT : handle = 2
For any technical queries, please open an issue on GitHub. We will get back to you soon.