Espressif Systems ESP32 Instruction Set page 90

At instruction set and examples
Hide thumbs Also See for ESP32:
Table of Contents

Advertisement

!
- Configure the characteristic's descriptor. Please note that the target characteristic's
property has to support the indicate operation.
AT+BLEGATTCWR=0,3,7,1,2
Response:
>
OK
�� Note:
If the ESP32 Client writes the descriptor successfully, message
+WRITE:<conn_index>,<srv_index>,<char_index>, <desc_index>,<len>,<value> will be prompted on
the ESP32 Server side.
ESP32 Server:
- Indicate characteristic. Please note that the target characteristic's property has to
support the indicate operation.
AT+BLEGATTSIND=0,1,7,3
Response:
>
OK
�� Note:
If the ESP32 Client receives the indication, it will prompt message
+INDICATE:<conn_index>,<srv_index>,<char_index>, <len>,<value>
For the same service, the <srv_index> on the ESP32 Client side equals the <srv_index> on the ESP32
Server side + 2.
9.5.2.2. UART-BLE Passthrough Mode
Below is an example of using two ESP32 modules: one as a BLE server (hereafter named
as "ESP32 Server") and the other one as a BLE client (hereafter named as "ESP32 Client").
The example shows how to build BLE SPP (Serial Port Profile, UART-BLE passthrough
mode) with AT commands.
⚠ Notice:
Download the service bin into the flash of the ESP32 Server.
On how to generate a service bin, please refer to esp32-at/tools/readme.md.
The download address of the "service bin" is the address of "ble_data" in esp32-at/at_customize.csv.
1. BLE initialization:
ESP32 Server:
- BLE server initialization:
AT+BLEINIT=2 // server role
Espressif
// waiting for serial data, should input HEX string "02" here
// waiting for serial data
84 97
!
/!
9. AT Commands Examples
2019.06

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Questions and answers

Table of Contents