Page 149 of 195
AT.s LE Command Set v5.1.1b
Copyright © 2002-2021 BlueRadios, Inc.
200 S. Wilcox St., Unit 158 • Castle Rock, CO 80104 • USA • 303-957-1003 •
Characteristic Read Long (ATGRL)
GATT READ LONG
Function:
This command is used to read specific characteristic values or descriptors from a server when
the attribute handle of the characteristic value or descriptor is known.
This command allows reads greater than MTU-1 bytes in length. The MTU (Maximum Transmission Unit)
of a connection can be found using the ATCS? Command.
Command Format:
ATGRL,<Conn_Handle>,<Att_Handle>,<Value_Format>
Command Parameter(s):
▪
Conn_Handle:
Connection handle.
▪
Att_Handle:
Attribute handle of the characteristic value or descriptor to read.
▪
Value_Format:
How the value will be formatted when returned by the GATT_VAL event.
0 = Hex
5 = String
Example(s):
1.
ATGRL is used to read a value from handle 54. The value is 33 bytes long, so 2 GATT_LVAL’s are
returned followed by a GATT_DONE. The first GATT_VAL returns the first portion of the data from
offset 0 and the second returns the final portion of the data from offset 22.
COMMAND:
ATGRL,0,54
<cr>
RESPONSE:
<cr_lf>
OK
<cr_lf>
EVENT:
<cr_lf>
GATT_LVAL,0,54,0,22,
11223344556677889900112233445566778899001122
<cr_lf>
EVENT:
<cr_lf>
GATT_LVAL,0,54,22,11,3344556677889900112233
<cr_lf>
EVENT:
<cr_lf>
GATT_DONE,0,6,0
<cr_lf>