!
6.2.24. AT+BLEGATTCPRIMSRV—GATTC Discovers Primary Services
Commands
Response
Parameters
Note
Example
6.2.25. AT+BLEGATTCINCLSRV—GATTC Discovers Included Services
Commands
Response
Parameters
Note
Espressif
Query Command:
AT+BLEGATTCPRIMSRV=<conn_index>
Function: GATTC discovers primary services.
+BLEGATTCPRIMSRV:<conn_index>,<srv_index>,<srv_uuid>,<srv_type>
OK
<conn_index>: index of BLE connection; only 0 is supported for the single connection right
now, but multiple BLE connections will be supported in the future.
<srv_index>: service's index starting from 1
<srv_uuid>: service's UUID
<srv_type>: service's type
‣ 0: is not a primary service
‣ 1: is a primary service
The BLE connection has to be established first.
AT+BLEINIT=1 // role: client
AT+BLECONN=0,"24:12:5f:9d:91:98"
AT+BLEGATTCPRIMSRV=0
Set Command:
AT+BLEGATTCINCLSRV=<conn_index>,<srv_index>
Function: GATTC discovers included services.
+BLEGATTCINCLSRV:<conn_index>,<srv_index>,<srv_uuid>,<srv_type>,<included_srv_
uuid>,<included_srv_type>
OK
<conn_index>: index of BLE connection; only 0 is supported for the single connection right
now, but multiple BLE connections will be supported in the future.
<srv_index>: service's index; it can be fetched with command
AT+BLEGATTCPRIMSRV=<conn_index>
<srv_uuid>: service's UUID
<srv_type>: service's type
‣ 0: is not a primary service
‣ 1: is a primary service
<included_srv_uuid>: included service's UUID
<included_srv_type>: included service's type
‣ 0: is not a primary service
‣ 1: is a primary service
The BLE connection has to be established first.
55 97
!
/!
6. BLE-Related AT Commands
2019.06
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?
Questions and answers