Espressif Systems ESP32 Instruction Set page 93

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

Advertisement

!
+BLEGATTSCHAR:"char",1,1,0xC300
+BLEGATTSCHAR:"desc",1,1,1
+BLEGATTSCHAR:"char",1,2,0xC301
+BLEGATTSCHAR:"desc",1,2,1
+BLEGATTSCHAR:"char",1,3,0xC302
+BLEGATTSCHAR:"desc",1,3,1
OK
ESP32 Client:
- Discover services:
AT+BLEGATTCPRIMSRV=0
Response:
+BLEGATTCPRIMSRV:0,1,0x1801,1
+BLEGATTCPRIMSRV:0,2,0x1800,1
+BLEGATTCPRIMSRV:0,3,0xA002,1
OK
⚠ Notice:
When discovering services, the ESP32 Client will get two more default services (UUID:0x1800 and
0x1801) than what the ESP32 Server will get.
So, for the same service, the <srv_index> received by the ESP32 Client equals the <srv_index>
received by ESP32 Server plus 2.
For example, the <srv_index> of the above-mentioned service, 0xA002, is 3 when the ESP32 Client is
in the process of discovering services. But if the ESP32 Server tries to discover it with command
AT+BLEGATTSSRV?, the <srv_index> will be 1.
- Discover characteristics.
AT+BLEGATTCCHAR=0,3
Response:
+BLEGATTCCHAR:"char",0,3,1,0xC300,2
+BLEGATTCCHAR:"desc",0,3,1,1,0x2901
+BLEGATTCCHAR:"char",0,3,2,0xC301,2
+BLEGATTCCHAR:"desc",0,3,2,1,0x2901
+BLEGATTCCHAR:"char",0,3,3,0xC302,8
+BLEGATTCCHAR:"desc",0,3,3,1,0x2901
+BLEGATTCCHAR:"char",0,3,4,0xC303,4
+BLEGATTCCHAR:"desc",0,3,4,1,0x2901
+BLEGATTCCHAR:"char",0,3,5,0xC304,8
+BLEGATTCCHAR:"char",0,3,6,0xC305,16
+BLEGATTCCHAR:"desc",0,3,6,1,0x2902
+BLEGATTCCHAR:"char",0,3,7,0xC306,32
+BLEGATTCCHAR:"desc",0,3,7,1,0x2902
Espressif
87 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