At+Blegattsind-Gatts Indicates Characteristics - Espressif Systems ESP32 Instruction Set

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

Advertisement

!
Parameters
Example
6.2.22. AT+BLEGATTSIND—GATTS Indicates Characteristics
Commands
Response
Parameters
Espressif
<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+BLEGATTSCHAR?
<char_index>: characteristic's index; it can be fetched with command AT+BLEGATTSCHAR?
<length>: data length
A simple workflow is shown below. Users can refer to Section 9.5 BLE AT Examples for
more details.
AT+BLEINIT=2 // role: server
AT+BLEGATTSSRVCRE
AT+BLEGATTSSRVSTART
AT+BLEADVSTART // starts advertising. After the client is connected, it must be configured to
receive notifications.
AT+BLEGATTSCHAR? // check which characteristic the client will be notified of
// for example, to notify of 4 bytes of data using the 6th characteristic in the 3rd service, use
the following command:
AT+BLEGATTSNTFY=0,3,6,4
// after > shows, inputs 4 bytes of data, such as "1234"; then, the data will be transmitted
automatically
Set Command:
AT+BLEGATTSIND=<conn_index>,<srv_index>,<char_index>,<length>
Function: GATTS indicates its characteristics.
wrap return
>
after the command. Begin receiving serial data. When the requirement of data
length, determined by <length>, is met, the indication starts.
If the data transmission is successful, the system returns:
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+BLEGATTSCHAR?
<char_index>: characteristic's index; it can be fetched with command AT+BLEGATTSCHAR?
<length>: data length
53 97
!
/!
6. BLE-Related AT Commands
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

Subscribe to Our Youtube Channel

Table of Contents