46 #define ATTS_SET_UUID_128 0x01 47 #define ATTS_SET_WRITE_CBACK 0x02 49 #define ATTS_SET_READ_CBACK 0x04 51 #define ATTS_SET_VARIABLE_LEN 0x08 52 #define ATTS_SET_ALLOW_OFFSET 0x10 53 #define ATTS_SET_CCC 0x20 55 #define ATTS_SET_ALLOW_SIGNED 0x40 56 #define ATTS_SET_REQ_SIGNED 0x80 65 #define ATTS_PERMIT_READ 0x01 66 #define ATTS_PERMIT_READ_AUTH 0x02 67 #define ATTS_PERMIT_READ_AUTHORIZ 0x04 68 #define ATTS_PERMIT_READ_ENC 0x08 69 #define ATTS_PERMIT_WRITE 0x10 70 #define ATTS_PERMIT_WRITE_AUTH 0x20 71 #define ATTS_PERMIT_WRITE_AUTHORIZ 0x40 72 #define ATTS_PERMIT_WRITE_ENC 0x80 82 #define ATTC_SET_UUID_128 0x01 83 #define ATTC_SET_REQUIRED 0x02 84 #define ATTC_SET_DESCRIPTOR 0x04 94 #define ATT_CBACK_START 0x02 126 #define ATT_CBACK_END ATT_EATT_RECONFIG_CMPL_IND 152 uint8_t transTimeout;
153 uint8_t numPrepWrites;
165 uint8_t *pPriorityTbl;
212 uint8_t
const *pUuid;
224 uint8_t changeAwareState;
269 uint16_t offset, uint16_t len, uint8_t *pValue,
346 uint8_t
const *pUuid;
353 uint8_t
const *pValue;
367 uint16_t svcStartHdl;
596 uint8_t
AttsSetAttr(uint16_t handle, uint16_t valueLen, uint8_t *pValue);
611 uint8_t
AttsGetAttr(uint16_t handle, uint16_t *pLen, uint8_t **pValue);
987 void AttsDynAddAttr(
void *pSvcHandle,
const uint8_t *pUuid,
const uint8_t *pValue, uint16_t len,
988 const uint16_t maxLen, uint8_t settings, uint8_t permissions);
1005 const uint16_t len, uint8_t settings, uint8_t permissions);
1079 uint16_t uuid16, uint16_t valueLen, uint8_t *pValue, bool_t continuing);
1096 uint8_t uuidLen, uint8_t *pUuid, bool_t continuing);
1152 uint8_t uuidLen, uint8_t *pUuid, bool_t continuing);
1196 uint16_t valueLen, uint8_t *pValue);
1214 uint8_t *pValue, bool_t valueByRef, bool_t continuing);
uint16_t AttsCccGet(dmConnId_t connId, uint8_t idx)
Get the value of a client characteristic configuration descriptor by its index. If not found...
#define ATT_CBACK_START
ATT callback event starting value.
void AttcReadLongReq(dmConnId_t connId, uint16_t handle, uint16_t offset, bool_t continuing)
Initiate an attribute protocol Read Long Request.
void AttcReadMultipleReq(dmConnId_t connId, uint8_t numHandles, uint16_t *pHandles)
Initiate an attribute protocol Read Multiple Request.
uint8_t dmConnId_t
Connection identifier.
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.
void AttsDynDeleteGroup(void *pSvcHandle)
Dynamically delete an ATT Service at runtime.
uint8_t AttsCsfWriteFeatures(dmConnId_t connId, uint16_t offset, uint16_t valueLen, uint8_t *pValue)
GATT write of client supported feature characteristic value.
void AttsCsfGetFeatures(dmConnId_t connId, uint8_t *pCsfOut, uint8_t pCsfOutLen)
Get client supported feature record.
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.
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_...
Read by type value response.
void AttcDiscCharStart(dmConnId_t connId, attcDiscCb_t *pCb)
This utility function starts characteristic and characteristic descriptor discovery for a service on ...
void AttsRemoveGroup(uint16_t startHandle)
Remove an attribute group from the attribute server.
uint32_t AttsGetSignCounter(dmConnId_t connId)
Get the current value peer's sign counter on this connection. This function is typically called from ...
void AttsAuthorRegister(attsAuthorCback_t cback)
Register an authorization callback with the attribute server.
void AttRegister(attCback_t cback)
Register a callback with ATT. This callback will be used for messages from both ATTC and ATTS...
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 connec...
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.
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.
uint8_t AttcDiscConfigStart(dmConnId_t connId, attcDiscCb_t *pCb)
This utility function starts characteristic configuration for characteristics on a peer device...
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.
void AttsCsfRegister(attsCsfWriteCback_t writeCback)
Register callback.
void AttsCsfSetClientChangeAwareState(dmConnId_t connId, uint8_t state)
Update a client's state of awareness to a change in the database.
void AttcSignedWriteCmd(dmConnId_t connId, uint16_t handle, uint32_t signCounter, uint16_t valueLen, uint8_t *pValue)
Initiate an attribute protocol signed Write Command.
void AttsCccClearTable(dmConnId_t connId)
Clear and deallocate the client characteristic configuration descriptor value table for a connection...
attCfg_t * pAttCfg
Configuration pointer.
ATT callback event starting value.
ATT run-time configurable parameters.
void AttsDynInit(void)
Initialize the Dynamic ATT Service subsystem.
void(* attCback_t)(attEvt_t *pEvt)
ATT event callback type.
uint16_t startHandle
The handle of the first attribute in this group.
void AttcIndConfirm(dmConnId_t connId)
Send an attribute protocol indication confirmation.
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.
attsWriteCback_t writeCback
Write callback function.
attsReadCback_t readCback
Read callback function.
void AttcExecuteWriteReq(dmConnId_t connId, bool_t writeAll)
Initiate an attribute protocol Execute Write Request.
ATT client structure for characteristic and descriptor discovery.
void AttsAddGroup(attsGroup_t *pGroup)
Add an attribute group to the attribute server.
void AttcSetAutoConfirm(bool_t enable)
Set automatic Indication Confirmations sent from this ATT Client.
void AttcInit(void)
Initialize ATT client.
Handle multiple value confirmation.
void AttcWriteCmd(dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue)
Initiate an attribute protocol Write Command.
Read multiple value notification.
void(* attsCccCback_t)(attsCccEvt_t *pEvt)
ATTS client characteristic configuration callback.
void AttsSignInit(void)
Initialize ATT server for data signing.
void AttsInit(void)
Initialize ATT server.
void AttsHandleValueNtf(dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue)
Send an attribute protocol Handle Value Notification.
uint8_t AttcDiscCharCmpl(attcDiscCb_t *pCb, attEvt_t *pMsg)
This utility function processes a characteristic discovery result. It should be called when an ATTC_R...
uint8_t(* attsAuthorCback_t)(dmConnId_t connId, uint8_t permit, uint16_t handle)
ATTS authorization callback type.
void AttcSignInit(void)
Initialize ATT client for data signing.
EATT Reconfigure complete.
void AttMsgFree(void *pMsg, uint8_t opcode)
Free an ATT message buffer allocated with AttMsgAlloc().
EATT run-time configurable parameters.
struct attsGroup_tag attsGroup_t
Attribute group.
attClientAwareStates
client's awareness to database change.
Handle value notification.
void AttcCancelReq(dmConnId_t connId)
Cancel an attribute protocol request in progress.
void AttsCalculateDbHash(void)
Calculate database hash from the GATT database.
bool_t AttsHashDatabaseString(uint8_t *pKey, uint8_t *pMsg, uint16_t msgLen)
Create hash from the database string.
eattCfg_t * pEattCfg
Enhanced configuration pointer.
void AttcFindInfoReq(dmConnId_t connId, uint16_t startHandle, uint16_t endHandle, bool_t continuing)
Initiate an attribute protocol Find Information Request.
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().
uint8_t AttcDiscConfigCmpl(dmConnId_t connId, attcDiscCb_t *pCb)
This utility function initiates the next characteristic configuration procedure. It should be called ...
uint16_t AttsCccEnabled(dmConnId_t connId, uint8_t idx)
Check if a client characteristic configuration descriptor is enabled and if the characteristic's secu...
uint8_t AttsGetAttr(uint16_t handle, uint16_t *pLen, uint8_t **pValue)
Get an attribute value in the attribute server.
ATTS client characteristic configuration callback structure.
void AttsHandleValueInd(dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue)
Send an attribute protocol Handle Value Indication.
void AttsCsfConnOpen(dmConnId_t connId, uint8_t changeAwareState, uint8_t *pCsf)
Initialize the client supported features for a connection.
struct attsGroup_tag * pNext
For internal use only.
void(* dmCback_t)(dmEvt_t *pDmEvt)
Callback type.
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.
Client characteristc configuration settings.
void * AttsDynCreateGroup(uint16_t startHandle, uint16_t endHandle)
Dynamically create an ATT Service at runtime.
ATT client discovery control block.
void AttcWriteReq(dmConnId_t connId, uint16_t handle, uint16_t valueLen, uint8_t *pValue)
Initiate an attribute protocol Write Request.
Device Manager subsystem API.
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...
void AttcMtuReq(dmConnId_t connId, uint16_t mtu)
Initiate an attribute protocol Exchange MTU Request.
Read multiple variable length response.
uint16_t AttGetMtu(dmConnId_t connId)
Get the attribute protocol MTU of a connection.
Read group type response.
void AttsIndInit(void)
Initialize ATT server for indications/notifications.
uint8_t(* attsReadCback_t)(dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, attsAttr_t *pAttr)
Attribute group read callback.
void * AttMsgAlloc(uint16_t len, uint8_t opcode)
Allocate an ATT message buffer to be sent with the ATT attribute protocol zero-copy APIs...
attsAttr_t * pAttr
Pointer to attribute list for this group.
Client supported features record structure.
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.
uint8_t AttcDiscConfigResume(dmConnId_t connId, attcDiscCb_t *pCb)
This utility function resumes the characteristic configuration procedure. It can be called when an AT...
uint8_t AttsSetAttr(uint16_t handle, uint16_t valueLen, uint8_t *pValue)
Set an attribute value in the attribute server.
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.
uint8_t AttsGetCccTableLen(void)
Get number of CCC entries in table.
void AttsDynRegister(void *pSvcHandle, attsReadCback_t readCback, attsWriteCback_t writeCback)
Register callback functions for a dynamic ATT Service at runtime.
Attribute protocol constants and definitions from the Bluetooth specification.
Attribute protocol UUIDs from the Bluetooth specification.
uint32_t wsfTimerTicks_t
Timer ticks data type.
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_...
void(* attsCsfWriteCback_t)(dmConnId_t connId, uint8_t changeAwareState, uint8_t *pCsf)
ATTS client supported features write callback type.
ATT client structure for characteristic and descriptor configuration.
uint16_t endHandle
The handle of the last attribute in this group.
EATT Connect channels complete.
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 co...
struct attcDiscChar_tag attcDiscChar_t
ATT client structure for characteristic and descriptor discovery.
Common message structure passed to event handler.
Client chracteristic configuration state change.
void AttsCccSet(dmConnId_t connId, uint8_t idx, uint16_t value)
Set the value of a client characteristic configuration descriptor by its index.
void AttsCsfInit(void)
Initialize ATTS client supported features module.
uint8_t AttsCsfGetClientChangeAwareState(dmConnId_t connId)
Get client state of awareness to a change in the database.
void AttcReadReq(dmConnId_t connId, uint16_t handle)
Initiate an attribute protocol Read Request.
Handle value confirmation.
void AttConnRegister(dmCback_t cback)
Register a connection callback with ATT. The callback is typically used to manage the attribute serve...
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...
Database hash calculation complete.
void AttsErrorTest(uint8_t status)
For testing purposes only.
Find by type value response.
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()...
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.