TI BLE Stack API Documentation  2.03.06
gatt.h
1 /******************************************************************************
2 
3  @file gatt.h
4 
5  @brief This file contains Generic Attribute Profile (GATT) definitions and
6  prototypes.<BR><BR>
7 
8  \image html HighLevelGATT.PNG
9 
10  \htmlinclude GATTDesc.html
11 
12  Group: WCS, BTS
13  $Target Device: DEVICES $
14 
15  ******************************************************************************
16  $License: TISD 2009 $
17  ******************************************************************************
18  $Release Name: PACKAGE NAME $
19  $Release Date: PACKAGE RELEASE DATE $
20  *****************************************************************************/
21 
22 #ifndef GATT_H
23 #define GATT_H
24 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
30 /*********************************************************************
31  * INCLUDES
32  */
33 #include "bcomdef.h"
34 #include "osal.h"
35 
36 #include "att.h"
37 
38 /*********************************************************************
39  * CONSTANTS
40  */
41 
46 #define GATT_PERMIT_READ 0x01
47 #define GATT_PERMIT_WRITE 0x02
48 #define GATT_PERMIT_AUTHEN_READ 0x04
49 #define GATT_PERMIT_AUTHEN_WRITE 0x08
50 #define GATT_PERMIT_AUTHOR_READ 0x10
51 #define GATT_PERMIT_AUTHOR_WRITE 0x20
52 #define GATT_PERMIT_ENCRYPT_READ 0x40
53 #define GATT_PERMIT_ENCRYPT_WRITE 0x80
54 
55 
62 #if !defined( GATT_MAX_NUM_PREPARE_WRITES )
63  #define GATT_MAX_NUM_PREPARE_WRITES 5
64 #endif
65 
73 #define GATT_MIN_ENCRYPT_KEY_SIZE 7
74 #define GATT_MAX_ENCRYPT_KEY_SIZE 16
75 
76 
83 #define GATT_MAX_ATTR_SIZE 512
84 
85 
87 // GATT Base Method
88 #define GATT_BASE_METHOD 0x40
89 
90 // Attribute handle definitions
91 #define GATT_INVALID_HANDLE 0x0000 // Invalid attribute handle
92 #define GATT_MIN_HANDLE 0x0001 // Minimum attribute handle
93 #define GATT_MAX_HANDLE 0xFFFF // Maximum attribute handle
94 
95 #define GATT_ATTR_HANDLE_SIZE 0x02 // Number of octets attribute handle
96 
97 #define GATT_MAX_MTU 0xFFFF // Maximum MTU size
98 
99 /*********************************************************************
100  * VARIABLES
101  */
102 
103 /*********************************************************************
104  * MACROS
105  */
106 
107 // Attribute Access Permissions
108 #define gattPermitRead( a ) ( (a) & GATT_PERMIT_READ )
109 #define gattPermitWrite( a ) ( (a) & GATT_PERMIT_WRITE )
110 #define gattPermitEncryptRead( a ) ( (a) & GATT_PERMIT_ENCRYPT_READ )
111 #define gattPermitEncryptWrite( a ) ( (a) & GATT_PERMIT_ENCRYPT_WRITE )
112 #define gattPermitAuthorRead( a ) ( (a) & GATT_PERMIT_AUTHOR_READ )
113 #define gattPermitAuthorWrite( a ) ( (a) & GATT_PERMIT_AUTHOR_WRITE )
114 #define gattPermitAuthenRead( a ) ( (a) & GATT_PERMIT_AUTHEN_READ )
115 #define gattPermitAuthenWrite( a ) ( (a) & GATT_PERMIT_AUTHEN_WRITE )
116 
117 // Check for different UUID types
118 #define gattPrimaryServiceType( t ) ( MAP_ATT_CompareUUID( primaryServiceUUID, ATT_BT_UUID_SIZE, \
119  (t).uuid, (t).len ) )
120 #define gattSecondaryServiceType( t ) ( MAP_ATT_CompareUUID( secondaryServiceUUID, ATT_BT_UUID_SIZE, \
121  (t).uuid, (t).len ) )
122 #define gattCharacterType( t ) ( MAP_ATT_CompareUUID( characterUUID, ATT_BT_UUID_SIZE, \
123  (t).uuid, (t).len ) )
124 #define gattIncludeType( t ) ( MAP_ATT_CompareUUID( includeUUID, ATT_BT_UUID_SIZE, \
125  (t).uuid, (t).len ) )
126 #define gattServiceType( t ) ( gattPrimaryServiceType( (t) ) || \
127  gattSecondaryServiceType( (t) ) )
128 
129 /*********************************************************************
130  * TYPEDEFS
131  */
132 
136 typedef struct
137 {
138  uint16 startHandle;
139  uint16 endHandle;
142 
146 typedef struct
147 {
151 
155 typedef struct
156 {
157  uint8 reliable;
159  uint16 lastOffset;
161 
165 typedef struct
166 {
167  uint8 reliable;
169  uint8 numReqs;
170  uint8 index;
171  uint8 flags;
174 
180 typedef union
181 {
182  // Request messages
198 
199  // Response messages
210 
211  // Indication and Notification messages
214 
215  // Locally-generated event messages
218 } gattMsg_t;
219 
224 typedef struct
225 {
227  uint16 connHandle;
228  uint8 method;
231 
235 typedef struct
236 {
237  uint8 len;
238  const uint8 *uuid;
240 
244 typedef struct attAttribute_t
245 {
247  uint8 permissions;
248  uint16 handle;
249  uint8* const pValue;
253 
257 typedef struct
258 {
259  uint16 numAttrs;
260  uint8 encKeySize;
261 
267 } gattService_t;
268 
269 /*********************************************************************
270  * VARIABLES
271  */
272 
273 extern uint8 gattNumConns;
274 
275 /*********************************************************************
276  * API FUNCTIONS
277  */
278 
279 /*-------------------------------------------------------------------
280  * GATT Client Public APIs
281  */
282 
295 extern bStatus_t GATT_InitClient( void );
296 
305 extern void GATT_RegisterForInd( uint8 taskId );
306 
325 extern bStatus_t GATT_PrepareWriteReq( uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId );
326 
346 extern bStatus_t GATT_ExecuteWriteReq( uint16 connHandle, attExecuteWriteReq_t *pReq, uint8 taskId );
347 
352 /*-------------------------------------------------------------------
353  * GATT Server Public APIs
354  */
355 
368 extern bStatus_t GATT_InitServer( void );
369 
396 extern bStatus_t GATT_RegisterService( gattService_t *pService );
397 
410 extern bStatus_t GATT_DeregisterService( uint16 handle, gattService_t *pService );
411 
419 extern void GATT_RegisterForReq( uint8 taskId );
420 
434 extern bStatus_t GATT_VerifyReadPermissions( uint16 connHandle, uint8 permissions, uint16 service );
435 
450 extern bStatus_t GATT_VerifyWritePermissions( uint16 connHandle, uint8 permissions,
451  uint16 service, attWriteReq_t *pReq );
452 
466 extern uint8 GATT_ServiceChangedInd( uint16 connHandle, uint8 taskId );
467 
479 extern gattAttribute_t *GATT_FindHandleUUID( uint16 startHandle, uint16 endHandle, const uint8 *pUUID,
480  uint16 len, uint16 *pHandle );
489 extern gattAttribute_t *GATT_FindHandle( uint16 handle, uint16 *pHandle );
490 
501 extern gattAttribute_t *GATT_FindNextAttr( gattAttribute_t *pAttr, uint16 endHandle,
502  uint16 service, uint16 *pLastHandle );
510 extern uint16 GATT_ServiceNumAttrs( uint16 handle );
511 
519 extern uint8 GATT_ServiceEncKeySize( uint16 handle );
520 
536 extern bStatus_t GATT_SendRsp( uint16 connHandle, uint8 method, gattMsg_t *pRsp );
537 
542 /*-------------------------------------------------------------------
543  * GATT Server Sub-Procedure APIs
544  */
545 
583 extern bStatus_t GATT_Indication( uint16 connHandle, attHandleValueInd_t *pInd,
584  uint8 authenticated, uint8 taskId );
612 extern bStatus_t GATT_Notification( uint16 connHandle, attHandleValueNoti_t *pNoti,
613  uint8 authenticated );
618 /*-------------------------------------------------------------------
619  * GATT Client Sub-Procedure APIs
620  */
621 
658 extern bStatus_t GATT_ExchangeMTU( uint16 connHandle, attExchangeMTUReq_t *pReq, uint8 taskId );
659 
690 extern bStatus_t GATT_DiscAllPrimaryServices( uint16 connHandle, uint8 taskId );
691 
727 extern bStatus_t GATT_DiscPrimaryServiceByUUID( uint16 connHandle, uint8 *pUUID,
728  uint8 len, uint8 taskId );
763 extern bStatus_t GATT_FindIncludedServices( uint16 connHandle, uint16 startHandle,
764  uint16 endHandle, uint8 taskId );
799 extern bStatus_t GATT_DiscAllChars( uint16 connHandle, uint16 startHandle,
800  uint16 endHandle, uint8 taskId );
835 extern bStatus_t GATT_DiscCharsByUUID( uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId );
836 
871 extern bStatus_t GATT_DiscAllCharDescs( uint16 connHandle, uint16 startHandle,
872  uint16 endHandle, uint8 taskId );
908 extern bStatus_t GATT_ReadCharValue( uint16 connHandle, attReadReq_t *pReq, uint8 taskId );
909 
943 extern bStatus_t GATT_ReadUsingCharUUID( uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId );
973 extern bStatus_t GATT_ReadLongCharValue( uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId );
974 
1006 extern bStatus_t GATT_ReadMultiCharValues( uint16 connHandle, attReadMultiReq_t *pReq, uint8 taskId );
1007 
1039 extern bStatus_t GATT_WriteNoRsp( uint16 connHandle, attWriteReq_t *pReq );
1040 
1077 extern bStatus_t GATT_SignedWriteNoRsp( uint16 connHandle, attWriteReq_t *pReq );
1078 
1113 extern bStatus_t GATT_WriteCharValue( uint16 connHandle, attWriteReq_t *pReq, uint8 taskId );
1114 
1150 extern bStatus_t GATT_WriteLongCharValue( uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId );
1151 
1198 extern bStatus_t GATT_ReliableWrites( uint16 connHandle, attPrepareWriteReq_t *pReqs,
1199  uint8 numReqs, uint8 flags, uint8 taskId );
1231 extern bStatus_t GATT_ReadCharDesc( uint16 connHandle, attReadReq_t *pReq, uint8 taskId );
1232 
1266 extern bStatus_t GATT_ReadLongCharDesc( uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId );
1267 
1299 extern bStatus_t GATT_WriteCharDesc( uint16 connHandle, attWriteReq_t *pReq, uint8 taskId );
1300 
1336 extern bStatus_t GATT_WriteLongCharDesc( uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId );
1337 
1342 /*-------------------------------------------------------------------
1343  * GATT Client and Server Common APIs
1344  */
1345 
1366 extern void GATT_RegisterForMsgs( uint8 taskID );
1367 
1378 extern bStatus_t GATT_NotifyEvent( uint16 connHandle, uint8 status, uint8 method, gattMsg_t *pMsg );
1379 
1388 extern void GATT_UpdateMTU( uint16 connHandle, uint16 mtuSize );
1389 
1394 /*-------------------------------------------------------------------
1395  * GATT Buffer Management APIs
1396  */
1397 
1417 extern void *GATT_bm_alloc( uint16 connHandle, uint8 opcode, uint16 size, uint16 *pSizeAlloc );
1418 
1427 extern void GATT_bm_free( gattMsg_t *pMsg, uint8 opcode );
1428 
1433 /*-------------------------------------------------------------------
1434  * GATT Flow Control APIs
1435  */
1436 
1456 extern void GATT_SetHostToAppFlowCtrl( uint16 heapSize, uint8 flowCtrlMode );
1457 
1466 extern void GATT_AppCompletedMsg( gattMsgEvent_t *pMsg );
1467 
1472 /*-------------------------------------------------------------------
1473  * Internal API - This function is only called from GATT Qualification modules.
1474  */
1475 
1485 extern void GATT_SetNextHandle( uint16 handle );
1486 
1496 extern uint16 GATT_GetNextHandle( void );
1497 
1498 /*-------------------------------------------------------------------
1499  * TASK API - These functions must only be called by OSAL.
1500  */
1501 
1511 extern void GATT_Init( uint8 taskId );
1512 
1523 extern uint16 GATT_ProcessEvent( uint8 taskId, uint16 events );
1524 
1525 /*********************************************************************
1526 *********************************************************************/
1527 
1528 #ifdef __cplusplus
1529 }
1530 #endif
1531 
1532 #endif /* GATT_H */
gattAttrType_t type
Attribute type (2 or 16 octet UUIDs)
Definition: gatt.h:246
bStatus_t GATT_WriteCharDesc(uint16 connHandle, attWriteReq_t *pReq, uint8 taskId)
This sub-procedure is used to write a characteristic descriptor value to a server when the client kno...
uint8 encKeySize
Minimum encryption key size required by service (7-16 bytes)
Definition: gatt.h:260
void GATT_SetHostToAppFlowCtrl(uint16 heapSize, uint8 flowCtrlMode)
This API is used by the Application to turn flow control on or off for GATT messages sent from the Ho...
Definition: att.h:420
attFindInfoReq_t findInfoReq
ATT Find Information Request.
Definition: gatt.h:184
void GATT_RegisterForReq(uint8 taskId)
Register to receive incoming ATT Requests.
attReadBlobRsp_t readBlobRsp
ATT Read Blob Response.
Definition: gatt.h:206
bStatus_t GATT_VerifyReadPermissions(uint16 connHandle, uint8 permissions, uint16 service)
Verify the permissions of an attribute for reading.
gattFindByTypeValueReq_t gattFindByTypeValueReq
GATT Find By Type Value Request.
Definition: gatt.h:194
bStatus_t GATT_ReadLongCharValue(uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId)
This sub-procedure is used to read a Characteristic Value from a server when the client knows the Cha...
uint8 len
Length of UUID (2 or 6)
Definition: gatt.h:237
attAttrType_t value
Primary service UUID value (2 or 16 octets)
Definition: gatt.h:140
bStatus_t GATT_SendRsp(uint16 connHandle, uint8 method, gattMsg_t *pRsp)
Send an ATT Response message out.
attFindInfoRsp_t findInfoRsp
ATT Find Information Response.
Definition: gatt.h:202
uint8 index
Index of last Prepare Write Request sent.
Definition: gatt.h:170
void GATT_RegisterForMsgs(uint8 taskID)
Register your task ID to receive GATT local events and ATT Response messages pending for transmission...
bStatus_t GATT_ReadCharValue(uint16 connHandle, attReadReq_t *pReq, uint8 taskId)
This sub-procedure is used to read a Characteristic Value from a server when the client knows the Cha...
attFindByTypeValueRsp_t findByTypeValueRsp
ATT Find By Type Value Response.
Definition: gatt.h:203
attFlowCtrlViolatedEvt_t flowCtrlEvt
ATT Flow Control Violated Event.
Definition: gatt.h:216
uint8 GATT_ServiceEncKeySize(uint16 handle)
Get the minimum encryption key size required by a given service.
attReadRsp_t readRsp
ATT Read Response.
Definition: gatt.h:205
Definition: att.h:336
attExchangeMTUReq_t exchangeMTUReq
ATT Exchange MTU Request.
Definition: gatt.h:183
uint8 flags
Definition: gatt.h:171
Definition: gatt.h:180
Definition: att.h:476
attReadReq_t readReq
ATT Read Request.
Definition: gatt.h:187
bStatus_t GATT_ExecuteWriteReq(uint16 connHandle, attExecuteWriteReq_t *pReq, uint8 taskId)
The Execute Write Request is used to request the server to write or cancel the write of all the prepa...
Definition: att.h:346
Definition: att.h:612
bStatus_t GATT_RegisterService(gattService_t *pService)
Register a service attribute list with the GATT Server. A service is composed of characteristics or r...
bStatus_t GATT_DiscCharsByUUID(uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId)
This sub-procedure is used by a client to discover service characteristics on a server when only the ...
attReadByGrpTypeRsp_t readByGrpTypeRsp
ATT Read By Group Type Response.
Definition: gatt.h:208
Definition: gatt.h:235
gattAttribute_t * GATT_FindHandleUUID(uint16 startHandle, uint16 endHandle, const uint8 *pUUID, uint16 len, uint16 *pHandle)
Find the attribute record for a given handle and UUID.
uint8 permissions
Attribute permissions.
Definition: gatt.h:247
Definition: att.h:513
void GATT_bm_free(gattMsg_t *pMsg, uint8 opcode)
GATT implementation of the de-allocator functionality.
bStatus_t GATT_DiscAllCharDescs(uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId)
This sub-procedure is used by a client to find all the characteristic descriptor&#39;s Attribute Handles ...
bStatus_t GATT_WriteCharValue(uint16 connHandle, attWriteReq_t *pReq, uint8 taskId)
This sub-procedure is used to write a characteristic value to a server when the client knows the char...
uint8 *const pValue
Definition: gatt.h:249
attReadMultiReq_t readMultiReq
ATT Read Multiple Request.
Definition: gatt.h:189
Definition: att.h:354
gattMsg_t msg
Attribute protocol/profile message.
Definition: gatt.h:229
uint8 numReqs
Number of Prepare Write Requests.
Definition: gatt.h:169
Definition: att.h:485
bStatus_t GATT_SignedWriteNoRsp(uint16 connHandle, attWriteReq_t *pReq)
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Char...
bStatus_t GATT_NotifyEvent(uint16 connHandle, uint8 status, uint8 method, gattMsg_t *pMsg)
Send an event to upper layer application/protocol.
bStatus_t GATT_ReadCharDesc(uint16 connHandle, attReadReq_t *pReq, uint8 taskId)
This sub-procedure is used to read a characteristic descriptor from a server when the client knows th...
bStatus_t GATT_DiscAllPrimaryServices(uint16 connHandle, uint8 taskId)
This sub-procedure is used by a client to discover all the primary services on a server.
gattReliableWritesReq_t gattReliableWritesReq
GATT Reliable Writes Request.
Definition: gatt.h:197
uint16 endHandle
Last requested handle number.
Definition: gatt.h:139
bStatus_t GATT_WriteLongCharDesc(uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId)
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Char...
Definition: att.h:494
attReadByTypeRsp_t readByTypeRsp
ATT Read By Type Response.
Definition: gatt.h:204
void * GATT_bm_alloc(uint16 connHandle, uint8 opcode, uint16 size, uint16 *pSizeAlloc)
GATT implementation of the allocator functionality.
attPrepareWriteReq_t * pReqs
Array of Prepare Write Requests (must be allocated)
Definition: gatt.h:168
bStatus_t GATT_ReadUsingCharUUID(uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId)
This sub-procedure is used to read a Characteristic Value from a server when the client only knows th...
attReadByGrpTypeReq_t readByGrpTypeReq
ATT Read By Group Type Request.
Definition: gatt.h:190
bStatus_t GATT_PrepareWriteReq(uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId)
The Prepare Write Request is used to request the server to prepare to write the value of an attribute...
bStatus_t GATT_DeregisterService(uint16 handle, gattService_t *pService)
Deregister a service attribute list with the GATT Server.
uint8 reliable
Whether reliable writes requested (always FALSE for Write Long)
Definition: gatt.h:157
attPrepareWriteRsp_t prepareWriteRsp
ATT Prepare Write Response.
Definition: gatt.h:209
attPrepareWriteReq_t req
ATT Prepare Write Request.
Definition: gatt.h:158
attFindByTypeValueReq_t findByTypeValueReq
ATT Find By Type Value Request.
Definition: gatt.h:185
Definition: gatt.h:136
attExecuteWriteReq_t executeWriteReq
ATT Execute Write Request.
Definition: gatt.h:193
attHandleValueInd_t handleValueInd
ATT Handle Value Indication.
Definition: gatt.h:213
uint16 GATT_ServiceNumAttrs(uint16 handle)
Get the number of attributes for a given service.
gattReadByTypeReq_t gattReadByTypeReq
GATT Read By Type Request.
Definition: gatt.h:195
bStatus_t GATT_Notification(uint16 connHandle, attHandleValueNoti_t *pNoti, uint8 authenticated)
This sub-procedure is used when a server is configured to notify a characteristic value to a client w...
attReadByTypeReq_t readByTypeReq
ATT Read By Type Request.
Definition: gatt.h:186
Status_t bStatus_t
BLE Generic Status return: BLE Default BLE Status Values.
Definition: bcomdef.h:244
gattWriteLongReq_t gattWriteLongReq
GATT Long Write Request.
Definition: gatt.h:196
attReadBlobReq_t readBlobReq
ATT Read Blob Request.
Definition: gatt.h:188
bStatus_t GATT_ExchangeMTU(uint16 connHandle, attExchangeMTUReq_t *pReq, uint8 taskId)
This sub-procedure is used by the client to set the ATT_MTU to the maximum possible value that can be...
uint8 method
Type of message.
Definition: gatt.h:228
attExchangeMTURsp_t exchangeMTURsp
ATT Exchange MTU Response.
Definition: gatt.h:201
attHandleValueNoti_t handleValueNoti
ATT Handle Value Notification.
Definition: gatt.h:212
gattAttribute_t * GATT_FindHandle(uint16 handle, uint16 *pHandle)
Find the attribute record for a given handle.
uint8 discCharsByUUID
Whether this is a GATT Discover Characteristics by UUID sub-procedure.
Definition: gatt.h:148
Definition: att.h:450
uint16 handle
Attribute handle - assigned internally by attribute server.
Definition: gatt.h:248
bStatus_t GATT_Indication(uint16 connHandle, attHandleValueInd_t *pInd, uint8 authenticated, uint8 taskId)
This sub-procedure is used when a server is configured to indicate a characteristic value to a client...
Definition: att.h:546
attWriteReq_t writeReq
ATT Write Request.
Definition: gatt.h:191
bStatus_t GATT_WriteNoRsp(uint16 connHandle, attWriteReq_t *pReq)
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Char...
Definition: att.h:598
uint16 startHandle
First requested handle number (must be first field)
Definition: gatt.h:138
bStatus_t GATT_ReadMultiCharValues(uint16 connHandle, attReadMultiReq_t *pReq, uint8 taskId)
This sub-procedure is used to read multiple Characteristic Values from a server when the client knows...
Definition: osal.h:89
Definition: gatt.h:146
Definition: att.h:389
Definition: att.h:399
attReadByTypeReq_t req
Read By Type Request.
Definition: gatt.h:149
Definition: att.h:429
Definition: att.h:362
void GATT_UpdateMTU(uint16 connHandle, uint16 mtuSize)
Update ATT_MTU size for a given connection.
Definition: att.h:523
uint16 lastOffset
Offset of last Prepare Write Request sent.
Definition: gatt.h:159
Definition: att.h:576
gattAttribute_t * attrs
Definition: gatt.h:266
Definition: att.h:439
osal_event_hdr_t hdr
GATT_MSG_EVENT and status.
Definition: gatt.h:226
bStatus_t GATT_DiscPrimaryServiceByUUID(uint16 connHandle, uint8 *pUUID, uint8 len, uint8 taskId)
This sub-procedure is used by a client to discover a specific primary service on a server when only t...
attErrorRsp_t errorRsp
ATT Error Response.
Definition: gatt.h:200
Definition: att.h:557
bStatus_t GATT_DiscAllChars(uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId)
This sub-procedure is used by a client to find all the characteristic declarations within a service d...
Definition: gatt.h:165
Definition: att.h:318
bStatus_t GATT_FindIncludedServices(uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId)
This sub-procedure is used by a client to find include service declarations within a service definiti...
Definition: gatt.h:244
bStatus_t GATT_ReliableWrites(uint16 connHandle, attPrepareWriteReq_t *pReqs, uint8 numReqs, uint8 flags, uint8 taskId)
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Char...
bStatus_t GATT_WriteLongCharValue(uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId)
This sub-procedure is used to write a Characteristic Value to a server when the client knows the Char...
attReadMultiRsp_t readMultiRsp
ATT Read Multiple Response.
Definition: gatt.h:207
uint8 GATT_ServiceChangedInd(uint16 connHandle, uint8 taskId)
Send out a Service Changed Indication.
bStatus_t GATT_ReadLongCharDesc(uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId)
This sub-procedure is used to read a characteristic descriptor from a server when the client knows th...
Definition: att.h:566
void GATT_RegisterForInd(uint8 taskId)
Register to receive incoming ATT Indications or Notifications of attribute values.
void GATT_AppCompletedMsg(gattMsgEvent_t *pMsg)
This API is used by the Application to notify GATT that the processing of a message has been complete...
uint8 reliable
Whether reliable writes requested (always TRUE for Reliable Writes)
Definition: gatt.h:167
const uint8 * uuid
Pointer to UUID.
Definition: gatt.h:238
Definition: att.h:458
attPrepareWriteReq_t prepareWriteReq
ATT Prepare Write Request.
Definition: gatt.h:192
Definition: gatt.h:257
gattAttribute_t * GATT_FindNextAttr(gattAttribute_t *pAttr, uint16 endHandle, uint16 service, uint16 *pLastHandle)
Find the next attribute of the same type for a given attribute.
bStatus_t GATT_InitClient(void)
Initialize the Generic Attribute Profile Client.
uint16 connHandle
Connection message was received on.
Definition: gatt.h:227
Definition: gatt.h:224
bStatus_t GATT_InitServer(void)
Initialize the Generic Attribute Profile Server.
Definition: gatt.h:155
Definition: att.h:467
uint16 numAttrs
Number of attributes in attrs.
Definition: gatt.h:259
Definition: att.h:503
attMtuUpdatedEvt_t mtuEvt
ATT MTU Updated Event.
Definition: gatt.h:217
Definition: att.h:535
bStatus_t GATT_VerifyWritePermissions(uint16 connHandle, uint8 permissions, uint16 service, attWriteReq_t *pReq)
Verify the permissions of an attribute for writing.