Page 142 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 •
8.13 GATT Client
The GATT client commands allow the module to use the Generic Attribute Profile (GATT) to discover and use the
services on a remote device. GATT commands cannot be cancelled using the ATDC command.
Discover All Primary Services (ATGDPS)
GATT DISCOVER ALL PRIMARY SERVICES
Function:
This command is used to discover all the primary services on a server.
Command Format:
ATGDPS,<Conn_Handle>,<Value_Format>
Command Parameter(s):
▪
Conn_Handle:
Connection handle.
▪
Value_Format:
How the services will be formatted when returned by the GATT_DPS event.
0 = Hex UUID
5 = Service Acronym String
– In this format if a 16-bit UUID of a BT5.0
defined service is
discovered, the service acronym will be returned instead. All other UUIDs will still be
returned as Hex UUIDs, except for the BRSP service.
Example(s):
1. ATGDPS is issued for connection handle 0 and 6 primary services are discovered: GAP, GATT,
DIS (Device Info), BAS (Battery), DFU (Firmware Update) and BRSP. When all the primary
services have been discovered a GATT_DONE event is triggered:
COMMAND:
ATGDPS,0
<cr>
RESPONSE:
<cr_lf>
OK
<cr_lf>
EVENT:
<cr_lf>
GATT_DPS,0,1,9,1800
<cr_lf>
EVENT:
<cr_lf>
GATT_DPS,0,10,13,1801
<cr_lf>
EVENT:
<cr_lf>
GATT_DPS,0,14,24,180A
<cr_lf>
EVENT:
<cr_lf>
GATT_DPS,0,25,28,180F
<cr_lf>
EVENT:
<cr_lf>
GATT_DPS,0,29,32,FE59
<cr_lf>
EVENT:
<cr_lf>
GATT_DPS,0,33,65535,DA2B84F1627948DEBDC0AFBEA0226079
<cr_lf>
EVENT:
<cr_lf>
GATT_DONE,0,0,0
<cr_lf>
2. Same as example 1, but using the Service Acronym String format:
COMMAND:
ATGDPS,0,5
<cr>
RESPONSE:
<cr_lf>
OK
<cr_lf>
EVENT:
<cr_lf>
GATT_DPS,0,1,9,GAP
<cr_lf>
EVENT:
<cr_lf>
GATT_DPS,0,10,13,GATT
<cr_lf>