Data Structures | |
struct | attsAttr_t |
Attribute structure. More... | |
struct | attsCsfRec_t |
Client supported features record structure. More... | |
struct | attsGroup_tag |
Attribute group. More... | |
struct | attsCccSet_t |
Client characteristc configuration settings. More... | |
struct | attsCccEvt_t |
ATTS client characteristic configuration callback structure. More... | |
ATT Server Attribute Settings | |
#define | ATTS_SET_UUID_128 0x01 |
Set if the UUID is 128 bits in length. More... | |
#define | ATTS_SET_WRITE_CBACK 0x02 |
Set if the group callback is executed when this attribute is written by a client device. More... | |
#define | ATTS_SET_READ_CBACK 0x04 |
Set if the group callback is executed when this attribute is read by a client device. More... | |
#define | ATTS_SET_VARIABLE_LEN 0x08 |
Set if the attribute has a variable length. More... | |
#define | ATTS_SET_ALLOW_OFFSET 0x10 |
Set if writes are allowed with an offset. More... | |
#define | ATTS_SET_CCC 0x20 |
Set if the attribute is a client characteristic configuration descriptor. More... | |
#define | ATTS_SET_ALLOW_SIGNED 0x40 |
Set if signed writes are allowed. More... | |
#define | ATTS_SET_REQ_SIGNED 0x80 |
Set if signed writes are required if link is not encrypted. More... | |
ATT Server Attribute Permissions | |
Permissions used to describe a attribute's security setting. These values can be set in any combination. | |
#define | ATTS_PERMIT_READ 0x01 |
Set if attribute can be read. More... | |
#define | ATTS_PERMIT_READ_AUTH 0x02 |
Set if attribute read requires authentication. More... | |
#define | ATTS_PERMIT_READ_AUTHORIZ 0x04 |
Set if attribute read requires authorization. More... | |
#define | ATTS_PERMIT_READ_ENC 0x08 |
Set if attribute read requires encryption. More... | |
#define | ATTS_PERMIT_WRITE 0x10 |
Set if attribute can be written. More... | |
#define | ATTS_PERMIT_WRITE_AUTH 0x20 |
Set if attribute write requires authentication. More... | |
#define | ATTS_PERMIT_WRITE_AUTHORIZ 0x40 |
Set if attribute write requires authorization. More... | |
#define | ATTS_PERMIT_WRITE_ENC 0x80 |
Set if attribute write requires encryption. More... | |
Attribute Server Data Types | |
typedef struct attsGroup_tag | attsGroup_t |
Attribute group. More... | |
ATT Server Callbacks | |
typedef uint8_t(* | attsReadCback_t) (dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, attsAttr_t *pAttr) |
Attribute group read callback. More... | |
typedef uint8_t(* | attsWriteCback_t) (dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, uint16_t len, uint8_t *pValue, attsAttr_t *pAttr) |
Attribute group write callback. More... | |
typedef uint8_t(* | attsAuthorCback_t) (dmConnId_t connId, uint8_t permit, uint16_t handle) |
ATTS authorization callback type. More... | |
typedef void(* | attsCsfWriteCback_t) (dmConnId_t connId, uint8_t changeAwareState, uint8_t *pCsf) |
ATTS client supported features write callback type. More... | |
typedef void(* | attsCccCback_t) (attsCccEvt_t *pEvt) |
ATTS client characteristic configuration callback. More... | |
ATT Server Functions | |
void | AttsInit (void) |
Initialize ATT server. More... | |
void | AttsIndInit (void) |
Initialize ATT server for indications/notifications. More... | |
void | AttsSignInit (void) |
Initialize ATT server for data signing. More... | |
void | AttsAuthorRegister (attsAuthorCback_t cback) |
Register an authorization callback with the attribute server. More... | |
void | AttsAddGroup (attsGroup_t *pGroup) |
Add an attribute group to the attribute server. More... | |
void | AttsRemoveGroup (uint16_t startHandle) |
Remove an attribute group from the attribute server. More... | |
void | AttsCalculateDbHash (void) |
Calculate database hash from the GATT database. More... | |
bool_t | AttsHashDatabaseString (uint8_t *pKey, uint8_t *pMsg, uint16_t msgLen) |
Create hash from the database string. More... | |
uint8_t | AttsSetAttr (uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Set an attribute value in the attribute server. More... | |
uint8_t | AttsGetAttr (uint16_t handle, uint16_t *pLen, uint8_t **pValue) |
Get an attribute value in the attribute server. More... | |
void | AttsHandleValueInd (dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Send an attribute protocol Handle Value Indication. More... | |
void | AttsHandleValueNtf (dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Send an attribute protocol Handle Value Notification. More... | |
void | AttsHandleValueIndZeroCpy (dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Send an attribute protocol Handle Value Indication without copying the attribute value data. More... | |
void | AttsHandleValueNtfZeroCpy (dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Send an attribute protocol Handle Value Notification without copying the attribute value data. More... | |
void | AttsCccRegister (uint8_t setLen, attsCccSet_t *pSet, attsCccCback_t cback) |
Register the utility service for managing client characteristic configuration descriptors. This function is typically called once on system initialization. More... | |
void | AttsCccInitTable (dmConnId_t connId, uint16_t *pCccTbl) |
Initialize the client characteristic configuration descriptor value table for a connection. The table is initialized with the values from pCccTbl. If pCccTbl is NULL the table will be initialized to zero. More... | |
void | AttsCccClearTable (dmConnId_t connId) |
Clear and deallocate the client characteristic configuration descriptor value table for a connection. This function must be called when a connection is closed. More... | |
uint16_t | AttsCccGet (dmConnId_t connId, uint8_t idx) |
Get the value of a client characteristic configuration descriptor by its index. If not found, return zero. More... | |
void | AttsCccSet (dmConnId_t connId, uint8_t idx, uint16_t value) |
Set the value of a client characteristic configuration descriptor by its index. More... | |
uint16_t | AttsCccEnabled (dmConnId_t connId, uint8_t idx) |
Check if a client characteristic configuration descriptor is enabled and if the characteristic's security level has been met. More... | |
uint8_t | AttsGetCccTableLen (void) |
Get number of CCC entries in table. More... | |
void | AttsContinueWriteReq (dmConnId_t connId, uint16_t handle, uint8_t status) |
Send a response to a pending write request. For use with ATT_RSP_PENDING. More... | |
void | AttsSetCsrk (dmConnId_t connId, uint8_t *pCsrk, bool_t authenticated) |
Set the peer's data signing key on this connection. This function is typically called from the ATT connection callback when the connection is established. The caller is responsible for maintaining the memory that contains the key. More... | |
void | AttsSetSignCounter (dmConnId_t connId, uint32_t signCounter) |
Set the peer's sign counter on this connection. This function is typically called from the ATT connection callback when the connection is established. ATT maintains the value of the sign counter internally and sets the value when a signed packet is successfully received. More... | |
uint32_t | AttsGetSignCounter (dmConnId_t connId) |
Get the current value peer's sign counter on this connection. This function is typically called from the ATT connection callback when the connection is closed so the application can store the sign counter for use on future connections. More... | |
void | AttsCsfInit (void) |
Initialize ATTS client supported features module. More... | |
void | AttsCsfConnOpen (dmConnId_t connId, uint8_t changeAwareState, uint8_t *pCsf) |
Initialize the client supported features for a connection. More... | |
uint8_t | AttsCsfWriteFeatures (dmConnId_t connId, uint16_t offset, uint16_t valueLen, uint8_t *pValue) |
GATT write of client supported feature characteristic value. More... | |
void | AttsCsfGetFeatures (dmConnId_t connId, uint8_t *pCsfOut, uint8_t pCsfOutLen) |
Get client supported feature record. More... | |
uint8_t | AttsCsfGetClientChangeAwareState (dmConnId_t connId) |
Get client state of awareness to a change in the database. More... | |
void | AttsCsfSetClientChangeAwareState (dmConnId_t connId, uint8_t state) |
Update a client's state of awareness to a change in the database. More... | |
void | AttsCsfRegister (attsCsfWriteCback_t writeCback) |
Register callback. More... | |
ATT Server Dynamic Service Subsystem Functions | |
void | AttsDynInit (void) |
Initialize the Dynamic ATT Service subsystem. More... | |
void * | AttsDynCreateGroup (uint16_t startHandle, uint16_t endHandle) |
Dynamically create an ATT Service at runtime. More... | |
void | AttsDynDeleteGroup (void *pSvcHandle) |
Dynamically delete an ATT Service at runtime. More... | |
void | AttsDynRegister (void *pSvcHandle, attsReadCback_t readCback, attsWriteCback_t writeCback) |
Register callback functions for a dynamic ATT Service at runtime. More... | |
void | AttsDynAddAttr (void *pSvcHandle, const uint8_t *pUuid, const uint8_t *pValue, uint16_t len, const uint16_t maxLen, uint8_t settings, uint8_t permissions) |
Dynamically add an attribute to a dynamic ATT Services at runtime. More... | |
void | AttsDynAddAttrConst (void *pSvcHandle, const uint8_t *pUuid, const uint8_t *pValue, const uint16_t len, uint8_t settings, uint8_t permissions) |
Dynamically add an attribute with a constant value to a dynamic ATT Services at runtime. More... | |
ATT Server Testing | |
void | AttsErrorTest (uint8_t status) |
For testing purposes only. More... | |
EATT Server Functions | |
void | EattsMultiValueNtf (dmConnId_t connId, uint8_t priority, uint16_t numTuples, eattTuple_t *pTupleList) |
Send multiple attribute protocol Handle Value Notification. More... | |
void | EattsHandleValueInd (dmConnId_t connId, uint8_t priority, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Send an attribute protocol Handle Value Indication. More... | |
void | EattsHandleValueNtf (dmConnId_t connId, uint8_t priority, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Send an attribute protocol Handle Value Notification. More... | |
void | EattsHandleValueIndZeroCpy (dmConnId_t connId, uint8_t priority, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Send an attribute protocol Handle Value Indication without copying the attribute value data. More... | |
void | EattsHandleValueNtfZeroCpy (dmConnId_t connId, uint8_t priority, uint16_t handle, uint16_t valueLen, uint8_t *pValue) |
Send an attribute protocol Handle Value Notification without copying the attribute value data. More... | |
void | EattsInit () |
Initialize the Enhanced ATT Server. More... | |
#define ATTS_PERMIT_READ 0x01 |
#define ATTS_PERMIT_READ_AUTH 0x02 |
#define ATTS_PERMIT_READ_AUTHORIZ 0x04 |
#define ATTS_PERMIT_READ_ENC 0x08 |
#define ATTS_PERMIT_WRITE 0x10 |
#define ATTS_PERMIT_WRITE_AUTH 0x20 |
#define ATTS_PERMIT_WRITE_AUTHORIZ 0x40 |
#define ATTS_PERMIT_WRITE_ENC 0x80 |
#define ATTS_SET_ALLOW_OFFSET 0x10 |
#define ATTS_SET_ALLOW_SIGNED 0x40 |
#define ATTS_SET_CCC 0x20 |
#define ATTS_SET_READ_CBACK 0x04 |
#define ATTS_SET_REQ_SIGNED 0x80 |
#define ATTS_SET_UUID_128 0x01 |
#define ATTS_SET_VARIABLE_LEN 0x08 |
#define ATTS_SET_WRITE_CBACK 0x02 |
typedef uint8_t(* attsAuthorCback_t) (dmConnId_t connId, uint8_t permit, uint16_t handle) |
ATTS authorization callback type.
This callback function is executed when a read or write operation occurs and the security field of an attribute structure is set to ATTS_PERMIT_READ_AUTHORIZ or ATTS_PERMIT_WRITE_AUTHORIZ respectively.
connId | DM Connection ID. |
permit | Set to ATTS_PERMIT_WRITE for a writre operation or ATTS_PERMIT_READ for a read operation. |
handle | Attribute handle. |
typedef void(* attsCccCback_t) (attsCccEvt_t *pEvt) |
ATTS client characteristic configuration callback.
Client characteristic configuration callback. This function is executed when a CCCD value changes. This happens when a peer device writes a new value to the CCCD or when a CCCD table is initialized by calling AttsCccInitTable.
pEvt | Pointer to callback structure. |
typedef void(* attsCsfWriteCback_t) (dmConnId_t connId, uint8_t changeAwareState, uint8_t *pCsf) |
ATTS client supported features write callback type.
This callback function is executed when the client supported features record for this client has been updated.
connId | DM Connection ID. |
changeAwareState | The state of awareness to a change, see attClientAwareStates. |
pCsf | Pointer to the client supported features value. |
typedef struct attsGroup_tag attsGroup_t |
Attribute group.
typedef uint8_t(* attsReadCback_t) (dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, attsAttr_t *pAttr) |
Attribute group read callback.
This is the attribute server read callback. It is executed on an attribute read operation if bitmask ATTS_SET_READ_CBACK is set in the settings field of the attribute structure. For a read operation, if the operation is successful the function must set pAttr->pValue to the data to be read. In addition, if the attribute is variable length then pAttr->pLen must be set as well.
connId | DM connection ID. |
handle | Attribute handle. |
operation | Operation type. |
offset | Read data offset. |
pAttr | Pointer to attribute structure. |
typedef uint8_t(* attsWriteCback_t) (dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, uint16_t len, uint8_t *pValue, attsAttr_t *pAttr) |
Attribute group write callback.
This is the attribute server write callback. It is executed on an attribute write operation if bitmask ATTS_SET_WRITE_CBACK is set in the settings field of the attribute structure.
connId | DM connection ID. |
handle | Attribute handle. |
operation | Operation type. |
offset | Write data offset. |
len | Length of data to write. |
pValue | Pointer to data to write. |
pAttr | Pointer to attribute structure. |
void AttsAddGroup | ( | attsGroup_t * | pGroup | ) |
Add an attribute group to the attribute server.
pGroup | Pointer to an attribute group structure. |
void AttsAuthorRegister | ( | attsAuthorCback_t | cback | ) |
Register an authorization callback with the attribute server.
cback | Client callback function. |
void AttsCalculateDbHash | ( | void | ) |
Calculate database hash from the GATT database.
void AttsCccClearTable | ( | dmConnId_t | connId | ) |
Clear and deallocate the client characteristic configuration descriptor value table for a connection. This function must be called when a connection is closed.
connId | DM connection ID. |
uint16_t AttsCccEnabled | ( | dmConnId_t | connId, |
uint8_t | idx | ||
) |
Check if a client characteristic configuration descriptor is enabled and if the characteristic's security level has been met.
connId | DM connection ID. |
idx | Index of descriptor in CCC descriptor handle table. |
uint16_t AttsCccGet | ( | dmConnId_t | connId, |
uint8_t | idx | ||
) |
Get the value of a client characteristic configuration descriptor by its index. If not found, return zero.
connId | DM connection ID. |
idx | Index of descriptor in CCC descriptor handle table. |
void AttsCccInitTable | ( | dmConnId_t | connId, |
uint16_t * | pCccTbl | ||
) |
Initialize the client characteristic configuration descriptor value table for a connection. The table is initialized with the values from pCccTbl. If pCccTbl is NULL the table will be initialized to zero.
This function must be called when a connection is established or when a device is bonded.
connId | DM connection ID. |
pCccTbl | Pointer to the descriptor value array. The length of the array must equal the value of setLen passed to AttsCccRegister(). |
void AttsCccRegister | ( | uint8_t | setLen, |
attsCccSet_t * | pSet, | ||
attsCccCback_t | cback | ||
) |
Register the utility service for managing client characteristic configuration descriptors. This function is typically called once on system initialization.
setLen | Length of settings array. |
pSet | Array of CCC descriptor settings. |
cback | Client callback function. |
void AttsCccSet | ( | dmConnId_t | connId, |
uint8_t | idx, | ||
uint16_t | value | ||
) |
Set the value of a client characteristic configuration descriptor by its index.
connId | DM connection ID. |
idx | Index of descriptor in CCC descriptor handle table. |
value | Value of the descriptor. |
void AttsContinueWriteReq | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint8_t | status | ||
) |
Send a response to a pending write request. For use with ATT_RSP_PENDING.
connId | Connection ID. |
handle | Attribute handle. |
status | Status of the write request. |
void AttsCsfConnOpen | ( | dmConnId_t | connId, |
uint8_t | changeAwareState, | ||
uint8_t * | pCsf | ||
) |
Initialize the client supported features for a connection.
connId | DM connection ID. |
changeAwareState | The state of awareness to a change in the database. |
pCsf | Pointer to the client supported features value to cache. NULL or buffer of length ATT_CSF_LEN. |
uint8_t AttsCsfGetClientChangeAwareState | ( | dmConnId_t | connId | ) |
Get client state of awareness to a change in the database.
connId | DM connection ID. |
void AttsCsfGetFeatures | ( | dmConnId_t | connId, |
uint8_t * | pCsfOut, | ||
uint8_t | pCsfOutLen | ||
) |
Get client supported feature record.
connId | DM connection ID. |
pCsfOut | Output parameter for client supported features buffer. |
pCsfOutLen | Length of output parameter buffer. |
void AttsCsfInit | ( | void | ) |
Initialize ATTS client supported features module.
void AttsCsfRegister | ( | attsCsfWriteCback_t | writeCback | ) |
Register callback.
writeCback | Application callback for when client supported features record is updated. |
void AttsCsfSetClientChangeAwareState | ( | dmConnId_t | connId, |
uint8_t | state | ||
) |
Update a client's state of awareness to a change in the database.
connId | DM connection ID. if DM_CONN_ID_NONE, sets the state for all connected clients. |
state | The state of awareness to a change, see attClientAwareStates. |
uint8_t AttsCsfWriteFeatures | ( | dmConnId_t | connId, |
uint16_t | offset, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
GATT write of client supported feature characteristic value.
connId | DM connection ID. |
offset | offset into csf characteristic. |
valueLen | length of write in bytes. |
pValue | Pointer to client's supported features characteristic value. |
void AttsDynAddAttr | ( | void * | pSvcHandle, |
const uint8_t * | pUuid, | ||
const uint8_t * | pValue, | ||
uint16_t | len, | ||
const uint16_t | maxLen, | ||
uint8_t | settings, | ||
uint8_t | permissions | ||
) |
Dynamically add an attribute to a dynamic ATT Services at runtime.
pSvcHandle | Service handle returned by AttsDynCreateGroup |
pUuid | Constant UUID |
pValue | Initial value of attribute (copied into attribute memory) |
len | Length of pValue in bytes |
maxLen | Maximum length of the attribute in bytes |
settings | Attribute settings |
permissions | Attribute permissions |
void AttsDynAddAttrConst | ( | void * | pSvcHandle, |
const uint8_t * | pUuid, | ||
const uint8_t * | pValue, | ||
const uint16_t | len, | ||
uint8_t | settings, | ||
uint8_t | permissions | ||
) |
Dynamically add an attribute with a constant value to a dynamic ATT Services at runtime.
pSvcHandle | Service handle returned by AttsDynCreateGroup |
pUuid | Constant UUID |
pValue | Pointer to constant attribute memory |
len | Length of pValue in bytes |
settings | Attribute settings |
permissions | Attribute permissions |
void* AttsDynCreateGroup | ( | uint16_t | startHandle, |
uint16_t | endHandle | ||
) |
Dynamically create an ATT Service at runtime.
startHandle | Starting attribute handle in the service |
endHandle | Last attribute handle in the service |
void AttsDynDeleteGroup | ( | void * | pSvcHandle | ) |
Dynamically delete an ATT Service at runtime.
pSvcHandle | Service handle returned by AttsDynCreateGroup |
void AttsDynInit | ( | void | ) |
Initialize the Dynamic ATT Service subsystem.
void AttsDynRegister | ( | void * | pSvcHandle, |
attsReadCback_t | readCback, | ||
attsWriteCback_t | writeCback | ||
) |
Register callback functions for a dynamic ATT Service at runtime.
pSvcHandle | Service handle returned by AttsDynCreateGroup |
readCback | Read callback function |
writeCback | Write callback function |
void AttsErrorTest | ( | uint8_t | status | ) |
For testing purposes only.
status | ATT status |
uint8_t AttsGetAttr | ( | uint16_t | handle, |
uint16_t * | pLen, | ||
uint8_t ** | pValue | ||
) |
Get an attribute value in the attribute server.
handle | Attribute handle. |
pLen | Returned attribute length pointer. |
pValue | Returned attribute value pointer. |
uint8_t AttsGetCccTableLen | ( | void | ) |
Get number of CCC entries in table.
uint32_t AttsGetSignCounter | ( | dmConnId_t | connId | ) |
Get the current value peer's sign counter on this connection. This function is typically called from the ATT connection callback when the connection is closed so the application can store the sign counter for use on future connections.
connId | DM connection ID. |
void AttsHandleValueInd | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Send an attribute protocol Handle Value Indication.
connId | DM connection ID. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void AttsHandleValueIndZeroCpy | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Send an attribute protocol Handle Value Indication without copying the attribute value data.
Note: attribute value buffer 'pValue' must be allocated with AttMsgAlloc().
connId | DM connection ID. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void AttsHandleValueNtf | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Send an attribute protocol Handle Value Notification.
connId | DM connection ID. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void AttsHandleValueNtfZeroCpy | ( | dmConnId_t | connId, |
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Send an attribute protocol Handle Value Notification without copying the attribute value data.
Note: attribute value buffer 'pValue' must be allocated with AttMsgAlloc().
connId | DM connection ID. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
bool_t AttsHashDatabaseString | ( | uint8_t * | pKey, |
uint8_t * | pMsg, | ||
uint16_t | msgLen | ||
) |
Create hash from the database string.
pKey | Key for hashing. |
pMsg | Plaintext to hash. |
msgLen | Length of Plaintext data. |
void AttsIndInit | ( | void | ) |
Initialize ATT server for indications/notifications.
void AttsInit | ( | void | ) |
Initialize ATT server.
void AttsRemoveGroup | ( | uint16_t | startHandle | ) |
Remove an attribute group from the attribute server.
startHandle | Start handle of attribute group to be removed. |
uint8_t AttsSetAttr | ( | uint16_t | handle, |
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Set an attribute value in the attribute server.
handle | Attribute handle. |
valueLen | Attribute length. |
pValue | Attribute value. |
void AttsSetCsrk | ( | dmConnId_t | connId, |
uint8_t * | pCsrk, | ||
bool_t | authenticated | ||
) |
Set the peer's data signing key on this connection. This function is typically called from the ATT connection callback when the connection is established. The caller is responsible for maintaining the memory that contains the key.
connId | DM connection ID. |
pCsrk | Pointer to data signing key (CSRK). |
authenticated | True if CSRK is authenticated and false otherwise. |
void AttsSetSignCounter | ( | dmConnId_t | connId, |
uint32_t | signCounter | ||
) |
Set the peer's sign counter on this connection. This function is typically called from the ATT connection callback when the connection is established. ATT maintains the value of the sign counter internally and sets the value when a signed packet is successfully received.
connId | DM connection ID. |
signCounter | Sign counter. |
void AttsSignInit | ( | void | ) |
Initialize ATT server for data signing.
void EattsHandleValueInd | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Send an attribute protocol Handle Value Indication.
connId | DM connection ID. |
priority | Operation priority. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void EattsHandleValueIndZeroCpy | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Send an attribute protocol Handle Value Indication without copying the attribute value data.
Note: attribute value buffer 'pValue' must be allocated with AttMsgAlloc().
connId | DM connection ID. |
priority | Operation priority. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void EattsHandleValueNtf | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Send an attribute protocol Handle Value Notification.
connId | DM connection ID. |
priority | Operation priority. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void EattsHandleValueNtfZeroCpy | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | handle, | ||
uint16_t | valueLen, | ||
uint8_t * | pValue | ||
) |
Send an attribute protocol Handle Value Notification without copying the attribute value data.
Note: attribute value buffer 'pValue' must be allocated with AttMsgAlloc().
connId | DM connection ID. |
priority | Operation priority. |
handle | Attribute handle. |
valueLen | Length of value data. |
pValue | Pointer to value data. |
void EattsInit | ( | ) |
Initialize the Enhanced ATT Server.
void EattsMultiValueNtf | ( | dmConnId_t | connId, |
uint8_t | priority, | ||
uint16_t | numTuples, | ||
eattTuple_t * | pTupleList | ||
) |
Send multiple attribute protocol Handle Value Notification.
connId | DM connection ID. |
priority | Operation priority. |
valueLen | Length of value data. |
pValue | Pointer to value data. |