Data Structures | |
struct | attcDiscChar_tag |
ATT client structure for characteristic and descriptor discovery. More... | |
struct | attcDiscCfg_t |
ATT client structure for characteristic and descriptor configuration. More... | |
struct | attcDiscCb_t |
ATT client discovery control block. More... | |
ATT Client Discovery and Configuration Settings | |
Settings used to configurate ATT Discovery procedure for ATT Clients. | |
#define | ATTC_SET_UUID_128 0x01 |
Set if the UUID is 128 bits in length. More... | |
#define | ATTC_SET_REQUIRED 0x02 |
Set if characteristic must be discovered. More... | |
#define | ATTC_SET_DESCRIPTOR 0x04 |
Set if this is a characteristic descriptor. More... | |
ATT Client Data Types | |
typedef struct attcDiscChar_tag | attcDiscChar_t |
ATT client structure for characteristic and descriptor discovery. More... | |
ATT Client Functions | |
void | AttcInit (void) |
Initialize ATT client. More... | |
void | AttcSignInit (void) |
Initialize ATT client for data signing. More... | |
void | AttcFindInfoReq (dmConnId_t connId, uint16_t startHandle, uint16_t endHandle, bool_t continuing) |
Initiate an attribute protocol Find Information Request. More... | |
void | AttcFindByTypeValueReq (dmConnId_t connId, uint16_t startHandle, uint16_t endHandle, uint16_t uuid16, uint16_t valueLen, uint8_t *pValue, bool_t continuing) |
Initiate an attribute protocol Find By Type Value Request. More... | |
void | AttcReadByTypeReq (dmConnId_t connId, uint16_t startHandle, uint16_t endHandle, uint8_t uuidLen, uint8_t *pUuid, bool_t continuing) |
Initiate an attribute protocol Read By Type Request. More... | |
void | AttcReadReq (dmConnId_t connId, uint16_t handle) |
Initiate an attribute protocol Read Request. More... | |
void | AttcReadLongReq (dmConnId_t connId, uint16_t handle, uint16_t offset, bool_t continuing) |
Initiate an attribute protocol Read Long Request. More... | |
void | AttcReadMultipleReq (dmConnId_t connId, uint8_t numHandles, uint16_t *pHandles) |
Initiate an attribute protocol Read Multiple Request. More... | |
void | AttcReadByGroupTypeReq (dmConnId_t connId, uint16_t startHandle, uint16_t endHandle, uint8_t uuidLen, uint8_t *pUuid, bool_t continuing) |
Initiate an attribute protocol Read By Group Type Request. More... | |
void | AttcWriteReq (dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Initiate an attribute protocol Write Request. More... | |
void | AttcWriteCmd (dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Initiate an attribute protocol Write Command. More... | |
void | AttcSignedWriteCmd (dmConnId_t connId, uint16_t handle, uint32_t signCounter, uint16_t valueLen, uint8_t *pValue) |
Initiate an attribute protocol signed Write Command. More... | |
void | AttcPrepareWriteReq (dmConnId_t connId, uint16_t handle, uint16_t offset, uint16_t valueLen, uint8_t *pValue, bool_t valueByRef, bool_t continuing) |
Initiate an attribute protocol Prepare Write Request. More... | |
void | AttcExecuteWriteReq (dmConnId_t connId, bool_t writeAll) |
Initiate an attribute protocol Execute Write Request. More... | |
void | AttcCancelReq (dmConnId_t connId) |
Cancel an attribute protocol request in progress. More... | |
void | AttcDiscService (dmConnId_t connId, attcDiscCb_t *pCb, uint8_t uuidLen, uint8_t *pUuid) |
This utility function discovers the given service on a peer device. Function AttcFindByTypeValueReq() is called to initiate the discovery procedure. More... | |
uint8_t | AttcDiscServiceCmpl (attcDiscCb_t *pCb, attEvt_t *pMsg) |
This utility function processes a service discovery result. It should be called when an ATTC_FIND_BY_TYPE_VALUE_RSP callback event is received after service discovery is initiated by calling AttcDiscService(). More... | |
void | AttcDiscCharStart (dmConnId_t connId, attcDiscCb_t *pCb) |
This utility function starts characteristic and characteristic descriptor discovery for a service on a peer device. The service must have been previously discovered by calling AttcDiscService() and AttcDiscServiceCmpl(). More... | |
uint8_t | AttcDiscCharCmpl (attcDiscCb_t *pCb, attEvt_t *pMsg) |
This utility function processes a characteristic discovery result. It should be called when an ATTC_READ_BY_TYPE_RSP or ATTC_FIND_INFO_RSP callback event is received after characteristic discovery is initiated by calling AttcDiscCharStart(). More... | |
void | AttcDiscIncSvcStart (dmConnId_t connId, attcDiscCb_t *pCb) |
This utility function starts service include discovery for a service on a peer device. The service must have been previously discovered by calling AttcDiscService() and AttcDiscServiceCmpl(). More... | |
uint8_t | AttcDiscIncSvcCmpl (attcDiscCb_t *pCb, attEvt_t *pMsg) |
This utility function processes a service include discovery result. It should be called when an ATTC_READ_BY_TYPE_RSP allback event is received after service include discovery is initiated by calling AttcDiscIncSvcStart(). More... | |
uint8_t | AttcDiscConfigStart (dmConnId_t connId, attcDiscCb_t *pCb) |
This utility function starts characteristic configuration for characteristics on a peer device. The characteristics must have been previously discovered by calling AttcDiscCharStart() and AttcDiscCharCmpl(). More... | |
uint8_t | AttcDiscConfigCmpl (dmConnId_t connId, attcDiscCb_t *pCb) |
This utility function initiates the next characteristic configuration procedure. It should be called when an ATTC_READ_RSP or ATTC_WRITE_RSP callback event is received after characteristic configuration is initiated by calling AttcDiscConfigStart(). More... | |
uint8_t | AttcDiscConfigResume (dmConnId_t connId, attcDiscCb_t *pCb) |
This utility function resumes the characteristic configuration procedure. It can be called when an ATTC_READ_RSP or ATTC_WRITE_RSP callback event is received with failure status to attempt the read or write procedure again. More... | |
void | AttcMtuReq (dmConnId_t connId, uint16_t mtu) |
Initiate an attribute protocol Exchange MTU Request. More... | |
void | AttcSetAutoConfirm (bool_t enable) |
Set automatic Indication Confirmations sent from this ATT Client. More... | |
void | AttcIndConfirm (dmConnId_t connId) |
Send an attribute protocol indication confirmation. More... | |
EATT Client Functions | |
void | EattcFindInfoReq (dmConnId_t connId, uint8_t priority, uint16_t startHandle, uint16_t endHandle, bool_t continuing) |
Initiate an attribute protocol Find Information Request. More... | |
void | EattcFindByTypeValueReq (dmConnId_t connId, uint8_t priority, uint16_t startHandle, uint16_t endHandle, uint16_t uuid16, uint16_t valueLen, uint8_t *pValue, bool_t continuing) |
Initiate an attribute protocol Find By Type Value Request. More... | |
void | EattcReadByTypeReq (dmConnId_t connId, uint8_t priority, uint16_t startHandle, uint16_t endHandle, uint8_t uuidLen, uint8_t *pUuid, bool_t continuing) |
Initiate an attribute protocol Read By Type Request. More... | |
void | EattcReadReq (dmConnId_t connId, uint8_t priority, uint16_t handle) |
Initiate an attribute protocol Read Request. More... | |
void | EattcReadLongReq (dmConnId_t connId, uint8_t priority, uint16_t handle, uint16_t offset, bool_t continuing) |
Initiate an attribute protocol Read Request. More... | |
void | EattcReadMultipleReq (dmConnId_t connId, uint8_t priority, uint8_t numHandles, uint16_t *pHandles) |
Initiate an attribute protocol Read Multiple Request. More... | |
void | EattcReadByGroupTypeReq (dmConnId_t connId, uint8_t priority, uint16_t startHandle, uint16_t endHandle, uint8_t uuidLen, uint8_t *pUuid, bool_t continuing) |
Initiate an attribute protocol Read By Group Type Request. More... | |
void | EattcWriteReq (dmConnId_t connId, uint8_t priority, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Initiate an attribute protocol Write Request. More... | |
void | EattcCancelReq (dmConnId_t connId, uint8_t priority) |
Cancel an attribute protocol request in progress. More... | |
void | EattcIndConfirm (dmConnId_t connId, uint16_t cid) |
Send an attribute protocol indication confirmation. More... | |
void | EattcWriteCmd (dmConnId_t connId, uint8_t priority, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Initiate an attribute protocol Write Command. More... | |
void | EattcPrepareWriteReq (dmConnId_t connId, uint8_t priority, uint16_t handle, uint16_t offset, uint16_t valueLen, uint8_t *pValue, bool_t valueByRef, bool_t continuing) |
Initiate an attribute protocol Prepare Write Request. More... | |
void | EattcExecuteWriteReq (dmConnId_t connId, uint8_t priority, bool_t writeAll) |
Initiate an attribute protocol Execute Write Request. More... | |
void | EattcReadMultVarLenReq (dmConnId_t connId, uint8_t priority, uint8_t numHandles, uint16_t *pHandles) |
Initiate an attribute protocol Read Multiple Variable Length Request. More... | |
void | EattcInit () |
Initialize the Enhanced ATT Client. More... | |
#define ATTC_SET_DESCRIPTOR 0x04 |
#define ATTC_SET_REQUIRED 0x02 |
#define ATTC_SET_UUID_128 0x01 |
typedef struct attcDiscChar_tag attcDiscChar_t |
ATT client structure for characteristic and descriptor discovery.
void AttcCancelReq | ( | dmConnId_t | connId | ) |
Cancel an attribute protocol request in progress.
connId | DM connection ID. |
uint8_t AttcDiscCharCmpl | ( | attcDiscCb_t * | pCb, |
attEvt_t * | pMsg | ||
) |
This utility function processes a characteristic discovery result. It should be called when an ATTC_READ_BY_TYPE_RSP or ATTC_FIND_INFO_RSP callback event is received after characteristic discovery is initiated by calling AttcDiscCharStart().
pCb | Pointer to discovery control block. |
pMsg | ATT callback event message. |
void AttcDiscCharStart | ( | dmConnId_t | connId, |
attcDiscCb_t * | pCb | ||
) |
This utility function starts characteristic and characteristic descriptor discovery for a service on a peer device. The service must have been previously discovered by calling AttcDiscService() and AttcDiscServiceCmpl().
connId | DM connection ID. |
pCb | Pointer to discovery control block. |
uint8_t AttcDiscConfigCmpl | ( | dmConnId_t | connId, |
attcDiscCb_t * | pCb | ||
) |
This utility function initiates the next characteristic configuration procedure. It should be called when an ATTC_READ_RSP or ATTC_WRITE_RSP callback event is received after characteristic configuration is initiated by calling AttcDiscConfigStart().
connId | DM connection ID. |
pCb | Pointer to discovery control block. |
uint8_t AttcDiscConfigResume | ( | dmConnId_t | connId, |
attcDiscCb_t * | pCb | ||
) |
This utility function resumes the characteristic configuration procedure. It can be called when an ATTC_READ_RSP or ATTC_WRITE_RSP callback event is received with failure status to attempt the read or write procedure again.
connId | DM connection ID. |
pCb | Pointer to discovery control block. |
uint8_t AttcDiscConfigStart | ( | dmConnId_t | connId, |
attcDiscCb_t * | pCb | ||
) |
This utility function starts characteristic configuration for characteristics on a peer device. The characteristics must have been previously discovered by calling AttcDiscCharStart() and AttcDiscCharCmpl().
connId | DM connection ID. |
pCb | Pointer to discovery control block. |
uint8_t AttcDiscIncSvcCmpl | ( | attcDiscCb_t * | pCb, |
attEvt_t * | pMsg | ||
) |
This utility function processes a service include discovery result. It should be called when an ATTC_READ_BY_TYPE_RSP allback event is received after service include discovery is initiated by calling AttcDiscIncSvcStart().
pCb | Pointer to service discovery control block. |
pMsg | ATT callback event message. |
void AttcDiscIncSvcStart | ( | dmConnId_t | connId, |
attcDiscCb_t * | pCb | ||
) |
This utility function starts service include discovery for a service on a peer device. The service must have been previously discovered by calling AttcDiscService() and AttcDiscServiceCmpl().
connId | DM connection ID. |
pCb | Pointer to service discovery control block. |
void AttcDiscService | ( | dmConnId_t | connId, |
attcDiscCb_t * | pCb, | ||
uint8_t | uuidLen, | ||
uint8_t * | pUuid | ||
) |
This utility function discovers the given service on a peer device. Function AttcFindByTypeValueReq() is called to initiate the discovery procedure.
connId | DM connection ID. |
pCb | Pointer to discovery control block. |
uuidLen | Length of service UUID (2 or 16). |
pUuid | Pointer to service UUID. |
uint8_t AttcDiscServiceCmpl | ( | attcDiscCb_t * | pCb, |
attEvt_t * | pMsg | ||
) |
This utility function processes a service discovery result. It should be called when an ATTC_FIND_BY_TYPE_VALUE_RSP callback event is received after service discovery is initiated by calling AttcDiscService().
pCb | Pointer to discovery control block. |
pMsg | ATT callback event message. |
void AttcExecuteWriteReq | ( | dmConnId_t | connId, |
bool_t | writeAll | ||
) |
Initiate an attribute protocol Execute Write Request.
connId | DM connection ID. |
writeAll | TRUE to write all queued writes, FALSE to cancel all queued writes. |
void AttcFindByTypeValueReq | ( | dmConnId_t | connId, |
uint16_t | startHandle, | ||
uint16_t | endHandle, | ||
uint16_t | uuid16, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Find By Type Value Request.
connId | DM connection ID. |
startHandle | Attribute start handle. |
endHandle | Attribute end handle. |
uuid16 | 16-bit UUID to find. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
continuing | TRUE if ATTC continues sending requests until complete. |
void AttcFindInfoReq | ( | dmConnId_t | connId, |
uint16_t | startHandle, | ||
uint16_t | endHandle, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Find Information Request.
connId | DM connection ID. |
startHandle | Attribute start handle. |
endHandle | Attribute end handle. |
continuing | TRUE if ATTC continues sending requests until complete. |
void AttcIndConfirm | ( | dmConnId_t | connId | ) |
Send an attribute protocol indication confirmation.
connId | DM connection ID. |
void AttcInit | ( | void | ) |
Initialize ATT client.
void AttcMtuReq | ( | dmConnId_t | connId, |
uint16_t | mtu | ||
) |
Initiate an attribute protocol Exchange MTU Request.
connId | DM connection ID. |
mtu | Attribute protocol MTU. |
void AttcPrepareWriteReq | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint16_t | offset, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue, | ||
bool_t | valueByRef, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Prepare Write Request.
connId | DM connection ID. |
handle | Attribute handle. |
offset | Write attribute data starting at this offset. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
valueByRef | TRUE if pValue data is accessed by reference rather than copied. |
continuing | TRUE if ATTC continues sending requests until complete. |
void AttcReadByGroupTypeReq | ( | dmConnId_t | connId, |
uint16_t | startHandle, | ||
uint16_t | endHandle, | ||
uint8_t | uuidLen, | ||
uint8_t * | pUuid, | ||
bool_t | continuing | ||
) |
void AttcReadByTypeReq | ( | dmConnId_t | connId, |
uint16_t | startHandle, | ||
uint16_t | endHandle, | ||
uint8_t | uuidLen, | ||
uint8_t * | pUuid, | ||
bool_t | continuing | ||
) |
void AttcReadLongReq | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint16_t | offset, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Read Long Request.
connId | DM connection ID. |
handle | Attribute handle. |
offset | Read attribute data starting at this offset. |
continuing | TRUE if ATTC continues sending requests until complete. |
void AttcReadMultipleReq | ( | dmConnId_t | connId, |
uint8_t | numHandles, | ||
uint16_t * | pHandles | ||
) |
Initiate an attribute protocol Read Multiple Request.
connId | DM connection ID. |
numHandles | Number of handles in attribute handle list. |
pHandles | List of attribute handles. |
void AttcReadReq | ( | dmConnId_t | connId, |
uint16_t | handle | ||
) |
Initiate an attribute protocol Read Request.
connId | DM connection ID. |
handle | Attribute handle. |
void AttcSetAutoConfirm | ( | bool_t | enable | ) |
Set automatic Indication Confirmations sent from this ATT Client.
enable | TRUE to enable automatic confirmations (default), FALSE to disable. |
void AttcSignedWriteCmd | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint32_t | signCounter, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Initiate an attribute protocol signed Write Command.
connId | DM connection ID. |
handle | Attribute handle. |
signCounter | Value of the sign counter. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void AttcSignInit | ( | void | ) |
Initialize ATT client for data signing.
void AttcWriteCmd | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Initiate an attribute protocol Write Command.
connId | DM connection ID. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void AttcWriteReq | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Initiate an attribute protocol Write Request.
connId | DM connection ID. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void EattcCancelReq | ( | dmConnId_t | connId, |
uint8_t | priority | ||
) |
Cancel an attribute protocol request in progress.
connId | DM connection ID. |
priority | Operation priority. |
void EattcExecuteWriteReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
bool_t | writeAll | ||
) |
Initiate an attribute protocol Execute Write Request.
connId | DM connection ID. |
priority | Operation priority. |
writeAll | TRUE to write all queued writes, FALSE to cancel all queued writes. |
void EattcFindByTypeValueReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | startHandle, | ||
uint16_t | endHandle, | ||
uint16_t | uuid16, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Find By Type Value Request.
connId | DM connection ID. |
priority | Operation priority. |
startHandle | Attribute start handle. |
endHandle | Attribute end handle. |
uuid16 | 16-bit UUID to find. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
continuing | TRUE if ATTC continues sending requests until complete. |
void EattcFindInfoReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | startHandle, | ||
uint16_t | endHandle, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Find Information Request.
connId | DM connection ID. |
priority | Operation priority. |
startHandle | Attribute start handle. |
endHandle | Attribute end handle. |
continuing | TRUE if ATTC continues sending requests until complete. |
void EattcIndConfirm | ( | dmConnId_t | connId, |
uint16_t | cid | ||
) |
Send an attribute protocol indication confirmation.
connId | DM connection ID. |
cid | L2Cap channel ID. |
void EattcInit | ( | ) |
Initialize the Enhanced ATT Client.
void EattcPrepareWriteReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | handle, | ||
uint16_t | offset, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue, | ||
bool_t | valueByRef, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Prepare Write Request.
connId | DM connection ID. |
priority | Operation priority. |
handle | Attribute handle. |
offset | Write attribute data starting at this offset. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
valueByRef | TRUE if pValue data is accessed by reference rather than copied. |
continuing | TRUE if ATTC continues sending requests until complete. |
void EattcReadByGroupTypeReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | startHandle, | ||
uint16_t | endHandle, | ||
uint8_t | uuidLen, | ||
uint8_t * | pUuid, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Read By Group Type Request.
connId | DM connection ID. |
priority | Operation priority. |
startHandle | Attribute start handle. |
endHandle | Attribute end handle. |
uuidLen | Length of UUID (2 or 16). |
pUuid | Pointer to UUID data. |
continuing | TRUE if ATTC continues sending requests until complete. |
void EattcReadByTypeReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | startHandle, | ||
uint16_t | endHandle, | ||
uint8_t | uuidLen, | ||
uint8_t * | pUuid, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Read By Type Request.
connId | DM connection ID. |
priority | Operation priority. |
startHandle | Attribute start handle. |
endHandle | Attribute end handle. |
uuidLen | Length of UUID (2 or 16). |
pUuid | Pointer to UUID data. |
continuing | TRUE if ATTC continues sending requests until complete. |
void EattcReadLongReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | handle, | ||
uint16_t | offset, | ||
bool_t | continuing | ||
) |
Initiate an attribute protocol Read Request.
connId | DM connection ID. |
priority | Operation priority. |
handle | Attribute handle. |
offset | Read attribute data starting at this offset. |
continuing | TRUE if ATTC continues sending requests until complete. |
void EattcReadMultipleReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint8_t | numHandles, | ||
uint16_t * | pHandles | ||
) |
Initiate an attribute protocol Read Multiple Request.
connId | DM connection ID. |
priority | Operation priority. |
numHandles | Number of handles in attribute handle list. |
pHandles | List of attribute handles. |
void EattcReadMultVarLenReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint8_t | numHandles, | ||
uint16_t * | pHandles | ||
) |
Initiate an attribute protocol Read Multiple Variable Length Request.
connId | DM connection ID. |
priority | Operation priority. |
numHandles | The number of handles in pHandles. |
pHandles | List of attribute handles to read. |
void EattcReadReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | handle | ||
) |
Initiate an attribute protocol Read Request.
connId | DM connection ID. |
priority | Operation priority. |
handle | Attribute handle. |
void EattcWriteCmd | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Initiate an attribute protocol Write Command.
connId | DM connection ID. |
priority | Operation priority. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void EattcWriteReq | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Initiate an attribute protocol Write Request.
connId | DM connection ID. |
priority | Operation priority. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |