![Telit Wireless Solutions BlueMod plus S42/Central Скачать руководство пользователя страница 15](http://html1.mh-extra.com/html/telit-wireless-solutions/bluemod-plus-s42-central/bluemod-plus-s42-central_software-users-manual_1083613015.webp)
S42/Central Software User Guide
1VV0301318 Rev. 3
– 2018-08-31
Reproduction forbidden without written authorization from Telit Communications S.p.A.- All Rights Reserved.
Page 15 of 66
3.1.1.5.
Reading Data from a Characteristic
To read data from a characteristic it is required that the properties of this characteristic supports
“read”, “notify
”
or
“
indicate
”
.
To read data bytes from a characteristic of the GATT server on the peripheral side the host
controller needs to use the connection handle and characteristic handle from the ATD and
AT+LESRVD commands.
AT+LEREAD=0x10,0x0011
LEREAD:0x10,0x0011,AABB
OK
The answer is separated into two parts:
The result message “OK” reports that reading to the required connection handle and
characteristic handle was successful.
The “LEREAD:0x10,0x0011,AABB” message reports the read data of the requested
connection handle “0x10” and characteristic handle “0x0011”.
The data is formatted as a hexadecimal stream “AABB” that includes two bytes 0xAA and
0xBB.
3.1.1.6.
Reading Data with Indications or Notifications
Indications and notifications are messages that inform the GATT client when a characteristic
on the GATT server changes its value.
▪
INDICATIONS:
The GATT client generated a response to the GATT server when
receiving data
•
NOTIFICATIONS: The GATT client generated no response to the GATT server when
receiving data
This feature has to be enabled by the client for a specific characteristic.
It is not possible to enable indications and notifications at the same time.
To use this feature, it is required that the properties of the characteristic supports “notify” or
“indicate”
.
This information is given in the service discovery for the characteristic in the “PROP”
value.