![]() |
Cordio Stack and Cordio Profiles
r2p3-02rel0
|
Data Structures | |
struct | appAdvCfg_t |
Configurable parameters for advertising. More... | |
struct | appExtAdvCfg_t |
Configurable parameters for extended and periodic advertising. More... | |
struct | appSlaveCfg_t |
Configurable parameters for slave. More... | |
struct | appMasterCfg_t |
Configurable parameters for master. More... | |
struct | appExtMasterCfg_t |
Configurable parameters for extended master. More... | |
struct | appSecCfg_t |
Configurable parameters for security. More... | |
struct | appUpdateCfg_t |
Configurable parameters for connection parameter update. More... | |
struct | appReqActCfg_t |
Configurable parameters for incoming request actions. More... | |
struct | appDiscCfg_t |
Configurable parameters for service and characteristic discovery. More... | |
struct | appCfg_t |
Configurable parameters for application. More... | |
struct | appDevInfo_t |
Device information data type. More... | |
Macros | |
#define | APP_ADV_NUM_CFG APP_ADV_STOPPED |
Number of advertising configurations. | |
#define | APP_RESOLVE_ADV_RPA 0 |
Resolving the advertiser's RPA (AdvA) | |
#define | APP_RESOLVE_DIRECT_RPA 1 |
Resolving RPA the directed advertisement is being directed to (InitA) | |
#define | APP_SCAN_RESULT_MAX 10 |
Number of scan results to store (used only when operating as master) | |
Typedefs | |
typedef void(* | appDiscCback_t) (dmConnId_t connId, uint8_t status) |
Service discovery and configuration callback. More... | |
Enumerations | |
enum | { APP_ADV_STATE1, APP_ADV_STATE2, APP_ADV_STATE3, APP_ADV_STOPPED } |
Advertising states. More... | |
enum | { APP_ADV_DATA_CONNECTABLE, APP_SCAN_DATA_CONNECTABLE, APP_ADV_DATA_DISCOVERABLE, APP_SCAN_DATA_DISCOVERABLE, APP_NUM_DATA_LOCATIONS } |
Advertising and scan data storage locations. More... | |
enum | { APP_DISC_INIT, APP_DISC_SEC_REQUIRED, APP_DISC_START, APP_DISC_CMPL, APP_DISC_FAILED, APP_DISC_CFG_START, APP_DISC_CFG_CONN_START, APP_DISC_CFG_CMPL } |
Service discovery and configuration client status. More... | |
enum | { APP_ACT_ACCEPT, APP_ACT_REJECT, APP_ACT_NONE } |
Actions for incoming requests. More... | |
Variables | |
appAdvCfg_t * | pAppAdvCfg |
This is a pointer to the advertising configurable parameters used by the application. If advertising is used, the application must set this variable during system initialization. | |
appExtAdvCfg_t * | pAppExtAdvCfg |
This is a pointer to the extended advertising configurable parameters used by the application. If extended advertising is used, the application must set this variable during system initialization. | |
appSlaveCfg_t * | pAppSlaveCfg |
This is a pointer to the slave configurable parameters used by the application. If slave mode is used, the application must set this variable during system initialization. | |
appMasterCfg_t * | pAppMasterCfg |
This is a pointer to the master configurable parameters used by the application. If master mode is used, the application must set this variable during system initialization. | |
appExtMasterCfg_t * | pAppExtMasterCfg |
This is a pointer to the extended master configurable parameters used by the application. If master mode is used, the application must set this variable during system initialization. | |
appSecCfg_t * | pAppSecCfg |
This is a pointer to the security-related configurable parameters used by the application. The application must set this variable during system initialization. | |
appUpdateCfg_t * | pAppUpdateCfg |
This is a pointer to the connection parameter update parameters used by the application. The application must set this variable during system initialization. | |
appDiscCfg_t * | pAppDiscCfg |
This is a pointer to the discovery parameters used by the application. The application must set this variable during system initialization. | |
appCfg_t * | pAppCfg |
This is a pointer to the application parameters used by the application. The application must set this variable during system initialization. | |
appReqActCfg_t * | pAppMasterReqActCfg |
This is a pointer to the master incoming request actions used by the application. The application must set this variable during system initialization. | |
appReqActCfg_t * | pAppSlaveReqActCfg |
This is a pointer to the master incoming request actions used by the application. The application must set this variable during system initialization. | |
App Advertising Mode | |
Discoverable/connectable mode used by function AppAdvStart. | |
#define | APP_MODE_CONNECTABLE 0 |
Connectable mode. | |
#define | APP_MODE_DISCOVERABLE 1 |
Discoverable mode. | |
#define | APP_MODE_AUTO_INIT 2 |
Automatically configure mode based on bonding info. | |
#define | APP_MODE_NONE 255 |
For internal use only. | |
#define | APP_NUM_MODES 2 |
Number of Discoverable/connectable modes. | |
App Initialization Functions | |
void | AppSlaveInit (void) |
Initialize the App Framework for operation as a Bluetooth LE slave. More... | |
void | AppMasterInit (void) |
Initialize the App Framework for operation as a Bluetooth LE master. More... | |
App Advertising Functions | |
Configure and send legacy, extended and periodic advertisments. | |
void | AppSetAdvType (uint8_t advType) |
Set advertising type. More... | |
void | AppSetAdvPeerAddr (uint8_t peerAddrType, uint8_t *pPeerAddr) |
Set advertising peer address and its type. More... | |
void | AppAdvSetData (uint8_t location, uint8_t len, uint8_t *pData) |
Set advertising or scan data. Separate advertising and scan data can be set for connectable and discoverable modes. The application must allocate and maintain the memory pointed to by pData while the device is advertising. More... | |
bool_t | AppAdvSetAdValue (uint8_t location, uint8_t adType, uint8_t len, uint8_t *pValue) |
Set the value of an advertising data element in the advertising or scan response data. If the element already exists in the data then it is replaced with the new value. If the element does not exist in the data it is appended to it, space permitting. More... | |
void | AppAdvStart (uint8_t mode) |
Start advertising using the parameters for the given mode. More... | |
void | AppAdvStop (void) |
Stop advertising. The device will no longer be connectable or discoverable. More... | |
dmConnId_t | AppConnAccept (uint8_t advType, uint8_t addrType, uint8_t *pAddr) |
Accept a connection to a peer device with the given address. More... | |
bool_t | AppSlaveIsAdvertising (void) |
Check if the local device's currently advertising. More... | |
void | AppExtSetAdvPeerAddr (uint8_t advHandle, uint8_t peerAddrType, uint8_t *pPeerAddr) |
Set advertising peer address and its type for the given advertising set. More... | |
void | AppExtAdvSetData (uint8_t advHandle, uint8_t location, uint16_t len, uint8_t *pData, uint16_t bufLen) |
Set extended advertising data. More... | |
void | AppExtAdvStart (uint8_t numSets, uint8_t *pAdvHandles, uint8_t mode) |
Start extended advertising using the parameters for the given mode. More... | |
void | AppExtAdvStop (uint8_t numSets, uint8_t *pAdvHandles) |
Stop extended advertising. If the number of sets is set to 0 then all advertising sets are disabled. More... | |
bool_t | AppExtAdvSetAdValue (uint8_t advHandle, uint8_t location, uint8_t adType, uint8_t len, uint8_t *pValue) |
Set the value of an advertising data element in the extended advertising or scan response data. If the element already exists in the data then it is replaced with the new value. If the element does not exist in the data it is appended to it, space permitting. More... | |
void | AppExtSetAdvType (uint8_t advHandle, uint8_t advType) |
Set extended advertising type. More... | |
dmConnId_t | AppExtConnAccept (uint8_t advHandle, uint8_t advType, uint8_t addrType, uint8_t *pAddr) |
Accept a connection to a peer device with the given address using a given advertising set. More... | |
void | AppPerAdvSetData (uint8_t advHandle, uint16_t len, uint8_t *pData, uint16_t bufLen) |
Set periodic advertising data. More... | |
void | AppPerAdvStart (uint8_t advHandle) |
Start periodic advertising for the given advertising handle. More... | |
void | AppPerAdvStop (uint8_t advHandle) |
Stop periodic advertising for the given advertising handle. More... | |
bool_t | AppPerAdvSetAdValue (uint8_t advHandle, uint8_t adType, uint8_t len, uint8_t *pValue) |
Set the value of an advertising data element in the periodic advertising data. If the element already exists in the data then it is replaced with the new value. If the element does not exist in the data it is appended to it, space permitting. More... | |
App Scan Functions | |
configure and enable legacy and extended scanning and periodic synch. | |
void | AppScanStart (uint8_t mode, uint8_t scanType, uint16_t duration) |
Start scanning. A scan is performed using the given discoverability mode, scan type, and duration. More... | |
void | AppScanStop (void) |
Stop scanning. More... | |
void | AppMasterResolveAddr (dmEvt_t *pMsg, appDbHdl_t dbHdl, uint8_t resolveType) |
Resolve the advertiser's RPA (AdvA) or the initiator's RPA (InitA) of a directed advertisement report. If the addresses resolved then a connection will be initiated. More... | |
void | AppExtScanStart (uint8_t scanPhys, uint8_t mode, const uint8_t *pScanType, uint16_t duration, uint16_t period) |
Start scanning. A scan is performed using the given scanner PHYs, discoverability mode, scan type, duration, and period. More... | |
void | AppExtScanStop (void) |
Stop scanning. More... | |
appDevInfo_t * | AppScanGetResult (uint8_t idx) |
Get a stored scan result from the scan result list. The first result is at index zero. More... | |
uint8_t | AppScanGetNumResults (void) |
Get the number of stored scan results. More... | |
dmSyncId_t | AppSyncStart (uint8_t advSid, uint8_t advAddrType, const uint8_t *pAdvAddr, uint16_t skip, uint16_t syncTimeout) |
Synchronize with periodic advertising from the given advertiser, and start receiving periodic advertising packets. More... | |
void | AppSyncStop (dmSyncId_t syncId) |
Stop reception of the periodic advertising identified by the given sync identifier. More... | |
App Connection Functions | |
dmConnId_t | AppConnOpen (uint8_t addrType, uint8_t *pAddr, appDbHdl_t dbHdl) |
Open a connection to a peer device with the given address. More... | |
void | AppConnClose (dmConnId_t connId) |
Close a connection with the given connection identifier. More... | |
dmConnId_t | AppExtConnOpen (uint8_t initPhys, uint8_t addrType, uint8_t *pAddr, appDbHdl_t dbHdl) |
Open a connection to a peer device with the given address. More... | |
dmConnId_t | AppConnIsOpen (void) |
Check if a connection is open. More... | |
uint8_t | AppConnOpenList (dmConnId_t *pConnIdList) |
Gets a list of connection identifiers of open connections. More... | |
App Security and Bonding Functions | |
Security and Bonding functions for configuration and interaction with Security Manager Protocol (SMP) Pairing procedures. | |
void | AppSetBondable (bool_t bondable) |
Set the bondable mode of the device. More... | |
void | AppMasterSecurityReq (dmConnId_t connId) |
Initiate security as a master device. If there is a stored encryption key for the peer device this function will initiate encryption, otherwise it will initiate pairing. More... | |
void | AppSlaveSecurityReq (dmConnId_t connId) |
Initiate a request for security as a slave device. This function will send a message to the master peer device requesting security. The master device should either initiate encryption or pairing. More... | |
void | AppHandlePasskey (dmSecAuthReqIndEvt_t *pAuthReq) |
Handle a passkey request during pairing. If the passkey is to be displayed, a random passkey is generated and displayed. If the passkey is to be entered the user is prompted to enter the passkey. More... | |
void | AppHandleNumericComparison (dmSecCnfIndEvt_t *pCnfInd) |
Handle a numeric comparison indication during pairing. The confirmation value is displayed and the user is prompted to verify that the local and peer confirmation values match. More... | |
App Event Processing | |
Process received messages for which there is a general process. | |
void | AppSlaveProcDmMsg (dmEvt_t *pMsg) |
Process connection-related DM messages for a slave. This function should be called from the application's event handler. More... | |
void | AppSlaveSecProcDmMsg (dmEvt_t *pMsg) |
Process security-related DM messages for a slave. This function should be called from the application's event handler. More... | |
void | AppMasterProcDmMsg (dmEvt_t *pMsg) |
Process connection-related DM messages for a master. This function should be called from the application's event handler. More... | |
void | AppMasterSecProcDmMsg (dmEvt_t *pMsg) |
Process security-related DM messages for a master. This function should be called from the application's event handler. More... | |
void | AppServerConnCback (dmEvt_t *pDmEvt) |
ATT connection callback for app framework. This function is used when the application is operating as an ATT server and it uses notifications or indications. This function can be called by the application's ATT connection callback or it can be installed as the ATT connection callback. More... | |
APP Service Discovery | |
GATT Service Discovery initialization, configuration and execution. | |
void | AppDiscInit (void) |
Initialize app framework discovery. More... | |
void | AppDiscRegister (appDiscCback_t cback) |
Register a callback function to service discovery status. More... | |
void | AppDiscSetHdlList (dmConnId_t connId, uint8_t hdlListLen, uint16_t *pHdlList) |
Set the discovery cached handle list for a given connection. More... | |
void | AppDiscComplete (dmConnId_t connId, uint8_t status) |
Service discovery or configuration procedure complete. More... | |
void | AppDiscFindService (dmConnId_t connId, uint8_t uuidLen, uint8_t *pUuid, uint8_t listLen, attcDiscChar_t **pCharList, uint16_t *pHdlList) |
Perform service and characteristic discovery for a given service. More... | |
void | AppDiscConfigure (dmConnId_t connId, uint8_t status, uint8_t cfgListLen, attcDiscCfg_t *pCfgList, uint8_t hdlListLen, uint16_t *pHdlList) |
Configure characteristics for discovered services. More... | |
void | AppDiscServiceChanged (attEvt_t *pMsg) |
Perform the GATT service changed procedure. This function is called when an indication is received containing the GATT service changed characteristic. This function may initialize the discovery state and initiate service discovery and configuration. More... | |
void | AppDiscProcDmMsg (dmEvt_t *pMsg) |
Process discovery-related DM messages. This function should be called from the application's event handler. More... | |
void | AppDiscProcAttMsg (attEvt_t *pMsg) |
Process discovery-related ATT messages. This function should be called from the application's event handler. More... | |
App Privacy Functions | |
void | AppAddDevToResList (dmEvt_t *pMsg, dmConnId_t connId) |
Add device to resolving list. More... | |
void | AppUpdatePrivacyMode (appDbHdl_t hdl) |
Update privacy mode for a given peer device. More... | |
typedef void(* appDiscCback_t) (dmConnId_t connId, uint8_t status) |
anonymous enum |
anonymous enum |
Advertising and scan data storage locations.
Definition at line 61 of file app_api.h.
anonymous enum |
Service discovery and configuration client status.
Definition at line 74 of file app_api.h.
anonymous enum |
void AppSlaveInit | ( | void | ) |
Initialize the App Framework for operation as a Bluetooth LE slave.
void AppMasterInit | ( | void | ) |
Initialize the App Framework for operation as a Bluetooth LE master.
void AppSetAdvType | ( | uint8_t | advType | ) |
Set advertising type.
advType | Advertising type. |
Set advertising peer address and its type.
peerAddrType | Peer address type. |
pPeerAddr | Peer address. |
Set advertising or scan data. Separate advertising and scan data can be set for connectable and discoverable modes. The application must allocate and maintain the memory pointed to by pData while the device is advertising.
location | Data location. |
len | Length of the data. Maximum length is 31 bytes. |
pData | Pointer to the data. |
Set the value of an advertising data element in the advertising or scan response data. If the element already exists in the data then it is replaced with the new value. If the element does not exist in the data it is appended to it, space permitting.
There is special handling for the device name (AD type DM_ADV_TYPE_LOCAL_NAME). If the name can only fit in the data if it is shortened, the name is shortened and the AD type is changed to DM_ADV_TYPE_SHORT_NAME.
location | Data location. |
adType | Advertising data element type. |
len | Length of the value. Maximum length is 29 bytes. |
pValue | Pointer to the value. |
void AppAdvStart | ( | uint8_t | mode | ) |
Start advertising using the parameters for the given mode.
mode | Discoverable/connectable mode. |
void AppAdvStop | ( | void | ) |
Stop advertising. The device will no longer be connectable or discoverable.
dmConnId_t AppConnAccept | ( | uint8_t | advType, |
uint8_t | addrType, | ||
uint8_t * | pAddr | ||
) |
Accept a connection to a peer device with the given address.
advType | Advertising type. |
addrType | Address type. |
pAddr | Peer device address. |
bool_t AppSlaveIsAdvertising | ( | void | ) |
Check if the local device's currently advertising.
Set advertising peer address and its type for the given advertising set.
advHandle | Advertising handle. |
peerAddrType | Peer address type. |
pPeerAddr | Peer address. |
void AppExtAdvSetData | ( | uint8_t | advHandle, |
uint8_t | location, | ||
uint16_t | len, | ||
uint8_t * | pData, | ||
uint16_t | bufLen | ||
) |
Set extended advertising data.
advHandle | Advertising handle. |
location | Data location. |
len | Length of the data. Maximum length is 31 bytes if advertising set uses legacy advertising PDUs with extended advertising. |
pData | Pointer to the data. |
bufLen | Length of the data buffer maintained by Application. Minimum length is 31 bytes. |
Start extended advertising using the parameters for the given mode.
numSets | Number of advertising sets. |
pAdvHandles | Advertising handles array. |
mode | Discoverable/connectable mode. |
Stop extended advertising. If the number of sets is set to 0 then all advertising sets are disabled.
numSets | Number of advertising sets. |
pAdvHandles | Advertising handle. |
bool_t AppExtAdvSetAdValue | ( | uint8_t | advHandle, |
uint8_t | location, | ||
uint8_t | adType, | ||
uint8_t | len, | ||
uint8_t * | pValue | ||
) |
Set the value of an advertising data element in the extended advertising or scan response data. If the element already exists in the data then it is replaced with the new value. If the element does not exist in the data it is appended to it, space permitting.
There is special handling for the device name (AD type DM_ADV_TYPE_LOCAL_NAME). If the name can only fit in the data if it is shortened, the name is shortened and the AD type is changed to DM_ADV_TYPE_SHORT_NAME.
advHandle | Advertising handle. |
location | Data location. |
adType | Advertising data element type. |
len | Length of the value. Maximum length is 31 bytes if advertising set uses legacy advertising PDUs with extended advertising. |
pValue | Pointer to the value. |
Set extended advertising type.
advHandle | Advertising handle. |
advType | Advertising type. |
dmConnId_t AppExtConnAccept | ( | uint8_t | advHandle, |
uint8_t | advType, | ||
uint8_t | addrType, | ||
uint8_t * | pAddr | ||
) |
Accept a connection to a peer device with the given address using a given advertising set.
advHandle | Advertising handle. |
advType | Advertising type. |
addrType | Address type. |
pAddr | Peer device address. |
Set periodic advertising data.
advHandle | Advertising handle. |
len | Length of the data. |
pData | Pointer to the data. |
bufLen | Length of the data buffer maintained by Application. Minimum length is 31 bytes. |
void AppPerAdvStart | ( | uint8_t | advHandle | ) |
Start periodic advertising for the given advertising handle.
advHandle | Advertising handle. |
void AppPerAdvStop | ( | uint8_t | advHandle | ) |
Stop periodic advertising for the given advertising handle.
advHandle | Advertising handle. |
Set the value of an advertising data element in the periodic advertising data. If the element already exists in the data then it is replaced with the new value. If the element does not exist in the data it is appended to it, space permitting.
There is special handling for the device name (AD type DM_ADV_TYPE_LOCAL_NAME). If the name can only fit in the data if it is shortened, the name is shortened and the AD type is changed to DM_ADV_TYPE_SHORT_NAME.
advHandle | Advertising handle. |
adType | Advertising data element type. |
len | Length of the value. Maximum length is 31 bytes if advertising set uses legacy advertising PDUs with extended advertising. |
pValue | Pointer to the value. |
Start scanning. A scan is performed using the given discoverability mode, scan type, and duration.
mode | Discoverability mode. |
scanType | Scan type. |
duration | The scan duration, in milliseconds. If set to zero, scanning will continue until AppScanStop() is called. |
void AppScanStop | ( | void | ) |
Stop scanning.
void AppMasterResolveAddr | ( | dmEvt_t * | pMsg, |
appDbHdl_t | dbHdl, | ||
uint8_t | resolveType | ||
) |
Resolve the advertiser's RPA (AdvA) or the initiator's RPA (InitA) of a directed advertisement report. If the addresses resolved then a connection will be initiated.
pMsg | Pointer to DM callback event message. |
dbHdl | Database record handle. |
resolveType | Which address in advertising report to be resolved. |
void AppExtScanStart | ( | uint8_t | scanPhys, |
uint8_t | mode, | ||
const uint8_t * | pScanType, | ||
uint16_t | duration, | ||
uint16_t | period | ||
) |
Start scanning. A scan is performed using the given scanner PHYs, discoverability mode, scan type, duration, and period.
scanPhys | Scanner PHYs. |
mode | Discoverability mode. |
pScanType | Scan type array. |
duration | The scan duration, in milliseconds. If set to zero or both duration and period set to non-zero, scanning will continue until DmExtScanStop() is called. |
period | The scan period, in 1.28 sec units. Set to zero to disable periodic scanning. |
void AppExtScanStop | ( | void | ) |
Stop scanning.
appDevInfo_t* AppScanGetResult | ( | uint8_t | idx | ) |
Get a stored scan result from the scan result list. The first result is at index zero.
idx | Index of result in scan result list. |
uint8_t AppScanGetNumResults | ( | void | ) |
Get the number of stored scan results.
dmSyncId_t AppSyncStart | ( | uint8_t | advSid, |
uint8_t | advAddrType, | ||
const uint8_t * | pAdvAddr, | ||
uint16_t | skip, | ||
uint16_t | syncTimeout | ||
) |
Synchronize with periodic advertising from the given advertiser, and start receiving periodic advertising packets.
advSid | Advertising SID. |
advAddrType | Advertiser address type. |
pAdvAddr | Advertiser address. |
skip | Number of periodic advertising packets that can be skipped after successful receive. |
syncTimeout | Synchronization timeout. |
void AppSyncStop | ( | dmSyncId_t | syncId | ) |
Stop reception of the periodic advertising identified by the given sync identifier.
syncId | Sync identifier. |
dmConnId_t AppConnOpen | ( | uint8_t | addrType, |
uint8_t * | pAddr, | ||
appDbHdl_t | dbHdl | ||
) |
Open a connection to a peer device with the given address.
addrType | Address type. |
pAddr | Peer device address. |
dbHdl | Device database handle. |
void AppConnClose | ( | dmConnId_t | connId | ) |
Close a connection with the given connection identifier.
connId | Connection identifier. |
dmConnId_t AppExtConnOpen | ( | uint8_t | initPhys, |
uint8_t | addrType, | ||
uint8_t * | pAddr, | ||
appDbHdl_t | dbHdl | ||
) |
Open a connection to a peer device with the given address.
initPhys | Initiator PHYs. |
addrType | Address type. |
pAddr | Peer device address. |
dbHdl | Device database handle. |
dmConnId_t AppConnIsOpen | ( | void | ) |
Check if a connection is open.
uint8_t AppConnOpenList | ( | dmConnId_t * | pConnIdList | ) |
Gets a list of connection identifiers of open connections.
pConnIdList | Buffer to hold connection IDs (must be DM_CONN_MAX bytes). |
void AppSetBondable | ( | bool_t | bondable | ) |
Set the bondable mode of the device.
bondable | TRUE to set device to bondable, FALSE to set to non-bondable. |
void AppMasterSecurityReq | ( | dmConnId_t | connId | ) |
Initiate security as a master device. If there is a stored encryption key for the peer device this function will initiate encryption, otherwise it will initiate pairing.
connId | Connection identifier. |
void AppSlaveSecurityReq | ( | dmConnId_t | connId | ) |
Initiate a request for security as a slave device. This function will send a message to the master peer device requesting security. The master device should either initiate encryption or pairing.
connId | Connection identifier. |
void AppHandlePasskey | ( | dmSecAuthReqIndEvt_t * | pAuthReq | ) |
Handle a passkey request during pairing. If the passkey is to be displayed, a random passkey is generated and displayed. If the passkey is to be entered the user is prompted to enter the passkey.
pAuthReq | DM authentication requested event structure. |
void AppHandleNumericComparison | ( | dmSecCnfIndEvt_t * | pCnfInd | ) |
Handle a numeric comparison indication during pairing. The confirmation value is displayed and the user is prompted to verify that the local and peer confirmation values match.
pCnfInd | DM confirmation indication event structure. |
void AppSlaveProcDmMsg | ( | dmEvt_t * | pMsg | ) |
Process connection-related DM messages for a slave. This function should be called from the application's event handler.
pMsg | Pointer to DM callback event message. |
void AppSlaveSecProcDmMsg | ( | dmEvt_t * | pMsg | ) |
Process security-related DM messages for a slave. This function should be called from the application's event handler.
pMsg | Pointer to DM callback event message. |
void AppMasterProcDmMsg | ( | dmEvt_t * | pMsg | ) |
Process connection-related DM messages for a master. This function should be called from the application's event handler.
pMsg | Pointer to DM callback event message. |
void AppMasterSecProcDmMsg | ( | dmEvt_t * | pMsg | ) |
Process security-related DM messages for a master. This function should be called from the application's event handler.
pMsg | Pointer to DM callback event message. |
void AppServerConnCback | ( | dmEvt_t * | pDmEvt | ) |
ATT connection callback for app framework. This function is used when the application is operating as an ATT server and it uses notifications or indications. This function can be called by the application's ATT connection callback or it can be installed as the ATT connection callback.
pDmEvt | DM callback event. |
void AppDiscInit | ( | void | ) |
Initialize app framework discovery.
void AppDiscRegister | ( | appDiscCback_t | cback | ) |
Register a callback function to service discovery status.
cback | Application service discovery callback function. |
void AppDiscSetHdlList | ( | dmConnId_t | connId, |
uint8_t | hdlListLen, | ||
uint16_t * | pHdlList | ||
) |
Set the discovery cached handle list for a given connection.
connId | Connection identifier. |
hdlListLen | Length of characteristic and handle lists. |
pHdlList | Characteristic handle list. |
void AppDiscComplete | ( | dmConnId_t | connId, |
uint8_t | status | ||
) |
Service discovery or configuration procedure complete.
connId | Connection identifier. |
status | Service or configuration status. |
void AppDiscFindService | ( | dmConnId_t | connId, |
uint8_t | uuidLen, | ||
uint8_t * | pUuid, | ||
uint8_t | listLen, | ||
attcDiscChar_t ** | pCharList, | ||
uint16_t * | pHdlList | ||
) |
Perform service and characteristic discovery for a given service.
connId | Connection identifier. |
uuidLen | Length of service UUID (2 or 16). |
pUuid | Pointer to service UUID. |
listLen | Length of characteristic and handle lists. |
pCharList | Characterisic list for discovery. |
pHdlList | Characteristic handle list. |
void AppDiscConfigure | ( | dmConnId_t | connId, |
uint8_t | status, | ||
uint8_t | cfgListLen, | ||
attcDiscCfg_t * | pCfgList, | ||
uint8_t | hdlListLen, | ||
uint16_t * | pHdlList | ||
) |
Configure characteristics for discovered services.
connId | Connection identifier. |
status | APP_DISC_CFG_START or APP_DISC_CFG_CONN_START. |
cfgListLen | Length of characteristic configuration list. |
pCfgList | Characteristic configuration list. |
hdlListLen | Length of characteristic handle list. |
pHdlList | Characteristic handle list. |
void AppDiscServiceChanged | ( | attEvt_t * | pMsg | ) |
Perform the GATT service changed procedure. This function is called when an indication is received containing the GATT service changed characteristic. This function may initialize the discovery state and initiate service discovery and configuration.
pMsg | Pointer to ATT callback event message containing received indication. |
void AppDiscProcDmMsg | ( | dmEvt_t * | pMsg | ) |
Process discovery-related DM messages. This function should be called from the application's event handler.
pMsg | Pointer to DM callback event message. |
void AppDiscProcAttMsg | ( | attEvt_t * | pMsg | ) |
Process discovery-related ATT messages. This function should be called from the application's event handler.
pMsg | Pointer to ATT callback event message. |
void AppAddDevToResList | ( | dmEvt_t * | pMsg, |
dmConnId_t | connId | ||
) |
Add device to resolving list.
pMsg | Pointer to DM callback event message. |
connId | Connection identifier. |
void AppUpdatePrivacyMode | ( | appDbHdl_t | hdl | ) |
Update privacy mode for a given peer device.
hdl | Database record handle. |