42 #define APP_MODE_CONNECTABLE 0 43 #define APP_MODE_DISCOVERABLE 1 44 #define APP_MODE_AUTO_INIT 2 45 #define APP_MODE_NONE 255 48 #define APP_NUM_MODES 2 71 #define APP_ADV_NUM_CFG APP_ADV_STOPPED 94 #define APP_RESOLVE_ADV_RPA 0 95 #define APP_RESOLVE_DIRECT_RPA 1
Service discovery started.
void AppHandleNumericComparison(dmSecCnfIndEvt_t *pCnfInd)
Handle a numeric comparison indication during pairing. The confirmation value is displayed and the us...
uint8_t wsfEventMask_t
Event handler event mask data type.
Service discovery complete.
uint8_t dmConnId_t
Connection identifier.
Configurable parameters for security.
void AppServerConnCback(dmEvt_t *pDmEvt)
ATT connection callback for app framework. This function is used when the application is operating as...
Scan data for connectable mode.
appMasterCfg_t * pAppMasterCfg
This is a pointer to the master configurable parameters used by the application. If master mode is us...
void * appDbHdl_t
Device database record handle type.
dmConnId_t AppConnAccept(uint8_t advType, uint8_t addrType, uint8_t *pAddr)
Accept a connection to a peer device with the given address.
void AppExtAdvStart(uint8_t numSets, uint8_t *pAdvHandles, uint8_t mode)
Start extended advertising using the parameters for the given mode.
appDevInfo_t * AppScanGetResult(uint8_t idx)
Get a stored scan result from the scan result list. The first result is at index zero.
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.
Data type for DM_SEC_COMPARE_IND.
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...
void AppMasterSecProcDmMsg(dmEvt_t *pMsg)
Process security-related DM messages for a master. This function should be called from the applicatio...
void AppPerAdvSetData(uint8_t advHandle, uint16_t len, uint8_t *pData, uint16_t bufLen)
Set periodic advertising data.
void AppConnClose(dmConnId_t connId)
Close a connection with the given connection identifier.
uint8_t bool_t
Boolean data type.
void AppHandlerInit(wsfHandlerId_t handlerId)
App framework handler init function called during system initialization.
appSlaveCfg_t * pAppSlaveCfg
This is a pointer to the slave configurable parameters used by the application. If slave mode is used...
void AppExtSetAdvPeerAddr(uint8_t advHandle, uint8_t peerAddrType, uint8_t *pPeerAddr)
Set advertising peer address and its type for the given advertising set.
appReqActCfg_t * pAppSlaveReqActCfg
This is a pointer to the master incoming request actions used by the application. The application mus...
void AppHandlePasskey(dmSecAuthReqIndEvt_t *pAuthReq)
Handle a passkey request during pairing. If the passkey is to be displayed, a random passkey is gener...
ATT client structure for characteristic and descriptor discovery.
void AppSlaveInit(void)
Initialize the App Framework for operation as a Bluetooth LE slave.
appReqActCfg_t * pAppMasterReqActCfg
This is a pointer to the master incoming request actions used by the application. The application mus...
Device information data type.
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 adverti...
dmConnId_t AppConnOpen(uint8_t addrType, uint8_t *pAddr, appDbHdl_t dbHdl)
Open a connection to a peer device with the given address.
void AppDiscRegister(appDiscCback_t cback)
Register a callback function to service discovery status.
appCfg_t * pAppCfg
This is a pointer to the application parameters used by the application. The application must set thi...
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 disco...
void AppExtScanStop(void)
Stop scanning.
void AppDiscServiceChanged(attEvt_t *pMsg)
Perform the GATT service changed procedure. This function is called when an indication is received co...
uint8_t AppScanGetNumResults(void)
Get the number of stored scan results.
appExtAdvCfg_t * pAppExtAdvCfg
This is a pointer to the extended advertising configurable parameters used by the application...
Security required to complete configuration.
void AppDiscProcDmMsg(dmEvt_t *pMsg)
Process discovery-related DM messages. This function should be called from the application's event ha...
Configurable parameters for service and characteristic discovery.
void AppMasterSecurityReq(dmConnId_t connId)
Initiate security as a master device. If there is a stored encryption key for the peer device this fu...
Do nothing - app will handle incoming request.
Configurable parameters for master.
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...
number of data storage locations.
Configuration for connection setup started.
Configurable parameters for advertising.
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.
uint8_t dmSyncId_t
Synchronization 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.
Service configuration started.
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...
Union of DM callback event data types.
Configurable parameters for application.
Advertising data for connectable mode.
void AppMasterProcDmMsg(dmEvt_t *pMsg)
Process connection-related DM messages for a master. This function should be called from the applicat...
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.
void AppSetAdvType(uint8_t advType)
Set 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...
void AppAdvStart(uint8_t mode)
Start advertising using the parameters for the given mode.
Advertising data for discoverable mode.
void AppAddDevToResList(dmEvt_t *pMsg, dmConnId_t connId)
Add device to resolving list.
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.
void AppDiscInit(void)
Initialize app framework discovery.
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.
Application framework device database.
void AppDiscSetHdlList(dmConnId_t connId, uint8_t hdlListLen, uint16_t *pHdlList)
Set the discovery cached handle list for a given connection.
void AppExtAdvSetData(uint8_t advHandle, uint8_t location, uint16_t len, uint8_t *pData, uint16_t bufLen)
Set extended advertising data.
#define DM_NUM_ADV_SETS
Number of supported advertising sets: must be set to 1 for legacy advertising.
void AppScanStop(void)
Stop scanning.
uint8_t wsfHandlerId_t
Event handler ID data type.
#define APP_ADV_NUM_CFG
Number of advertising configurations.
void AppDiscComplete(dmConnId_t connId, uint8_t status)
Service discovery or configuration procedure complete.
Configurable parameters for extended and periodic advertising.
Scan data for discoverable mode.
No discovery or configuration complete.
void AppSlaveSecurityReq(dmConnId_t connId)
Initiate a request for security as a slave device. This function will send a message to the master pe...
void AppHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
WSF event handler for app framework.
uint8_t bdAddr_t[BDA_ADDR_LEN]
BD address data type.
void AppSetBondable(bool_t bondable)
Set the bondable mode of the device.
bool_t AppSlaveIsAdvertising(void)
Check if the local device's currently advertising.
Device Manager subsystem API.
dmConnId_t AppConnIsOpen(void)
Check if a connection is open.
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.
void AppUpdatePrivacyMode(appDbHdl_t hdl)
Update privacy mode for a given peer device.
void AppSetAdvPeerAddr(uint8_t peerAddrType, uint8_t *pPeerAddr)
Set advertising peer address and its type.
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...
Configurable parameters for connection parameter update.
unsigned short uint16_t
Unsigned 16-bit value.
Data type for DM_SEC_AUTH_REQ_IND.
void AppExtSetAdvType(uint8_t advHandle, uint8_t advType)
Set extended advertising type.
Configurable parameters for extended master.
Service configuration complete.
void AppSyncStop(dmSyncId_t syncId)
Stop reception of the periodic advertising identified by the given sync identifier.
void AppSlaveProcDmMsg(dmEvt_t *pMsg)
Process connection-related DM messages for a slave. This function should be called from the applicati...
void AppSlaveSecProcDmMsg(dmEvt_t *pMsg)
Process security-related DM messages for a slave. This function should be called from the application...
void(* appDiscCback_t)(dmConnId_t connId, uint8_t status)
Service discovery and configuration callback.
appDiscCfg_t * pAppDiscCfg
This is a pointer to the discovery parameters used by the application. The application must set this ...
uint32_t wsfTimerTicks_t
Timer ticks data type.
ATT client structure for characteristic and descriptor configuration.
Configurable parameters for incoming request actions.
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...
void AppMasterInit(void)
Initialize the App Framework for operation as a Bluetooth LE master.
void AppDiscProcAttMsg(attEvt_t *pMsg)
Process discovery-related ATT messages. This function should be called from the application's event h...
Attribute protocol client and server API.
uint8_t AppConnOpenList(dmConnId_t *pConnIdList)
Gets a list of connection identifiers of open connections.
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.
Software foundation OS API.
Common message structure passed to event handler.
Configurable parameters for slave.
Service discovery failed.
void AppPerAdvStop(uint8_t advHandle)
Stop periodic advertising for the given advertising handle.
#define DM_NUM_PHYS
Number of scanner and initiator PHYs (LE 1M, LE 2M and LE Coded): must be set to 1 for legacy scanner...
unsigned char uint8_t
Unsigned 8-bit value.
void AppAdvStop(void)
Stop advertising. The device will no longer be connectable or discoverable.
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.
void AppPerAdvStart(uint8_t advHandle)
Start periodic advertising for the given advertising handle.