Mistake on this page? Email us
Data Structures

Data Structures

struct  attcDiscChar_t
 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.
 
#define ATTC_SET_REQUIRED   0x02
 Set if characteristic must be discovered.
 
#define ATTC_SET_DESCRIPTOR   0x04
 Set if this is a characteristic descriptor.
 

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...
 
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)
 For internal use only. 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...
 

Detailed Description

Function Documentation

void AttcInit ( void  )

Initialize ATT client.

Returns
None.
void AttcSignInit ( void  )

Initialize ATT client for data signing.

Returns
None.
void AttcFindInfoReq ( dmConnId_t  connId,
uint16_t  startHandle,
uint16_t  endHandle,
bool_t  continuing 
)

Initiate an attribute protocol Find Information Request.

Parameters
connIdDM connection ID.
startHandleAttribute start handle.
endHandleAttribute end handle.
continuingTRUE if ATTC continues sending requests until complete.
Returns
None.
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.

Parameters
connIdDM connection ID.
startHandleAttribute start handle.
endHandleAttribute end handle.
uuid1616-bit UUID to find.
valueLenLength of value data.
pValuePointer to value data.
continuingTRUE if ATTC continues sending requests until complete.
Returns
None.
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.

Parameters
connIdDM connection ID.
startHandleAttribute start handle.
endHandleAttribute end handle.
uuidLenLength of UUID (2 or 16).
pUuidPointer to UUID data.
continuingTRUE if ATTC continues sending requests until complete.
Returns
None.
void AttcReadReq ( dmConnId_t  connId,
uint16_t  handle 
)

Initiate an attribute protocol Read Request.

Parameters
connIdDM connection ID.
handleAttribute handle.
Returns
None.
void AttcReadLongReq ( dmConnId_t  connId,
uint16_t  handle,
uint16_t  offset,
bool_t  continuing 
)

Initiate an attribute protocol Read Long Request.

Parameters
connIdDM connection ID.
handleAttribute handle.
offsetRead attribute data starting at this offset.
continuingTRUE if ATTC continues sending requests until complete.
Returns
None.
void AttcReadMultipleReq ( dmConnId_t  connId,
uint8_t  numHandles,
uint16_t *  pHandles 
)

Initiate an attribute protocol Read Multiple Request.

Parameters
connIdDM connection ID.
numHandlesNumber of handles in attribute handle list.
pHandlesList of attribute handles.
Returns
None.
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.

Parameters
connIdDM connection ID.
startHandleAttribute start handle.
endHandleAttribute end handle.
uuidLenLength of UUID (2 or 16).
pUuidPointer to UUID data.
continuingTRUE if ATTC continues sending requests until complete.
Returns
None.
void AttcWriteReq ( dmConnId_t  connId,
uint16_t  handle,
uint16_t  valueLen,
uint8_t *  pValue 
)

Initiate an attribute protocol Write Request.

Parameters
connIdDM connection ID.
handleAttribute handle.
valueLenLength of value data.
pValuePointer to value data.
Returns
None.
void AttcWriteCmd ( dmConnId_t  connId,
uint16_t  handle,
uint16_t  valueLen,
uint8_t *  pValue 
)

Initiate an attribute protocol Write Command.

Parameters
connIdDM connection ID.
handleAttribute handle.
valueLenLength of value data.
pValuePointer to value data.
Returns
None.
void AttcSignedWriteCmd ( dmConnId_t  connId,
uint16_t  handle,
uint32_t  signCounter,
uint16_t  valueLen,
uint8_t *  pValue 
)

Initiate an attribute protocol signed Write Command.

Parameters
connIdDM connection ID.
handleAttribute handle.
signCounterValue of the sign counter.
valueLenLength of value data.
pValuePointer to value data.
Returns
None.
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.

Parameters
connIdDM connection ID.
handleAttribute handle.
offsetWrite attribute data starting at this offset.
valueLenLength of value data.
pValuePointer to value data.
valueByRefTRUE if pValue data is accessed by reference rather than copied.
continuingTRUE if ATTC continues sending requests until complete.
Returns
None.
void AttcExecuteWriteReq ( dmConnId_t  connId,
bool_t  writeAll 
)

Initiate an attribute protocol Execute Write Request.

Parameters
connIdDM connection ID.
writeAllTRUE to write all queued writes, FALSE to cancel all queued writes.
Returns
None.
void AttcCancelReq ( dmConnId_t  connId)

Cancel an attribute protocol request in progress.

Parameters
connIdDM connection ID.
Returns
None.
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.

Parameters
connIdDM connection ID.
pCbPointer to discovery control block.
uuidLenLength of service UUID (2 or 16).
pUuidPointer to service UUID.
Returns
None.
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().

Parameters
pCbPointer to discovery control block.
pMsgATT callback event message.
Returns
ATT_SUCCESS if successful otherwise error.
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().

Parameters
connIdDM connection ID.
pCbPointer to discovery control block.
Returns
None.
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().

Parameters
pCbPointer to discovery control block.
pMsgATT callback event message.
Returns
ATT_CONTINUING if successful and the discovery procedure is continuing. ATT_SUCCESS if the discovery procedure completed successfully. Otherwise the discovery procedure failed.
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().

Parameters
connIdDM connection ID.
pCbPointer to discovery control block.
Returns
ATT_CONTINUING if successful and configuration procedure is continuing. ATT_SUCCESS if nothing to configure.
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().

Parameters
connIdDM connection ID.
pCbPointer to discovery control block.
Returns
ATT_CONTINUING if successful and configuration procedure is continuing. ATT_SUCCESS if configuration procedure completed successfully.
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.

Parameters
connIdDM connection ID.
pCbPointer to discovery control block.
Returns
ATT_CONTINUING if successful and configuration procedure is continuing. ATT_SUCCESS if configuration procedure completed successfully.
void AttcMtuReq ( dmConnId_t  connId,
uint16_t  mtu 
)

For internal use only.

Parameters
connIdDM connection ID.
mtuAttribute protocol MTU.
Returns
None.
void AttcSetAutoConfirm ( bool_t  enable)

Set automatic Indication Confirmations sent from this ATT Client.

Parameters
enableTRUE to enable automatic confirmations (default), FALSE to disable.
Returns
None.
void AttcIndConfirm ( dmConnId_t  connId)

Send an attribute protocol indication confirmation.

Parameters
connIdDM connection ID.
Returns
None.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.