42 #define DM_ROLE_MASTER HCI_ROLE_MASTER 43 #define DM_ROLE_SLAVE HCI_ROLE_SLAVE 50 #define DM_DISC_MODE_NONE 0 51 #define DM_DISC_MODE_LIMITED 1 52 #define DM_DISC_MODE_GENERAL 2 59 #define DM_ADV_CONN_UNDIRECT 0 60 #define DM_ADV_CONN_DIRECT 1 61 #define DM_ADV_SCAN_UNDIRECT 2 62 #define DM_ADV_NONCONN_UNDIRECT 3 63 #define DM_ADV_CONN_DIRECT_LO_DUTY 4 70 #define DM_EXT_ADV_CONN_UNDIRECT 5 71 #define DM_EXT_ADV_NONCONN_DIRECT 6 72 #define DM_EXT_ADV_SCAN_DIRECT 7 73 #define DM_ADV_NONE 255 80 #define DM_RPT_CONN_UNDIRECT 0 81 #define DM_RPT_CONN_DIRECT 1 82 #define DM_RPT_SCAN_UNDIRECT 2 83 #define DM_RPT_NONCONN_UNDIRECT 3 84 #define DM_RPT_SCAN_RESPONSE 4 91 #define DM_DATA_LOC_ADV 0 92 #define DM_DATA_LOC_SCAN 1 99 #define DM_SCAN_TYPE_PASSIVE 0 100 #define DM_SCAN_TYPE_ACTIVE 1 107 #define DM_ADV_CHAN_37 HCI_ADV_CHAN_37 108 #define DM_ADV_CHAN_38 HCI_ADV_CHAN_38 109 #define DM_ADV_CHAN_39 HCI_ADV_CHAN_39 111 #define DM_ADV_CHAN_ALL (HCI_ADV_CHAN_37 | HCI_ADV_CHAN_38 | HCI_ADV_CHAN_39) 118 #define DM_CLIENT_ID_ATT 0 119 #define DM_CLIENT_ID_SMP 1 120 #define DM_CLIENT_ID_DM 2 121 #define DM_CLIENT_ID_APP 3 122 #define DM_CLIENT_ID_L2C 4 123 #define DM_CLIENT_ID_MAX 5 131 #define DM_CONN_ID_NONE 0 134 #define DM_SYNC_ID_NONE 0 141 #define DM_ADDR_PUBLIC 0x00 142 #define DM_ADDR_RANDOM 0x01 143 #define DM_ADDR_PUBLIC_IDENTITY 0x02 144 #define DM_ADDR_RANDOM_IDENTITY 0x03 145 #define DM_ADDR_RANDOM_UNRESOLVED 0xFE 146 #define DM_ADDR_NONE 0xFF 153 #define DM_ADV_TYPE_FLAGS 0x01 154 #define DM_ADV_TYPE_16_UUID_PART 0x02 155 #define DM_ADV_TYPE_16_UUID 0x03 156 #define DM_ADV_TYPE_32_UUID_PART 0x04 157 #define DM_ADV_TYPE_32_UUID 0x05 158 #define DM_ADV_TYPE_128_UUID_PART 0x06 159 #define DM_ADV_TYPE_128_UUID 0x07 160 #define DM_ADV_TYPE_SHORT_NAME 0x08 161 #define DM_ADV_TYPE_LOCAL_NAME 0x09 162 #define DM_ADV_TYPE_TX_POWER 0x0A 163 #define DM_ADV_TYPE_SM_TK_VALUE 0x10 164 #define DM_ADV_TYPE_SM_OOB_FLAGS 0x11 165 #define DM_ADV_TYPE_CONN_INTERVAL 0x12 166 #define DM_ADV_TYPE_SIGNED_DATA 0x13 167 #define DM_ADV_TYPE_16_SOLICIT 0x14 168 #define DM_ADV_TYPE_128_SOLICIT 0x15 169 #define DM_ADV_TYPE_SERVICE_DATA 0x16 170 #define DM_ADV_TYPE_PUBLIC_TARGET 0x17 171 #define DM_ADV_TYPE_RANDOM_TARGET 0x18 172 #define DM_ADV_TYPE_APPEARANCE 0x19 173 #define DM_ADV_TYPE_ADV_INTERVAL 0x1A 174 #define DM_ADV_TYPE_BD_ADDR 0x1B 175 #define DM_ADV_TYPE_ROLE 0x1C 176 #define DM_ADV_TYPE_32_SOLICIT 0x1F 177 #define DM_ADV_TYPE_SVC_DATA_32 0x20 178 #define DM_ADV_TYPE_SVC_DATA_128 0x21 179 #define DM_ADV_TYPE_LESC_CONFIRM 0x22 180 #define DM_ADV_TYPE_LESC_RANDOM 0x23 181 #define DM_ADV_TYPE_URI 0x24 182 #define DM_ADV_TYPE_MANUFACTURER 0xFF 189 #define DM_FLAG_LE_LIMITED_DISC 0x01 190 #define DM_FLAG_LE_GENERAL_DISC 0x02 191 #define DM_FLAG_LE_BREDR_NOT_SUP 0x04 198 #define DM_AD_LEN_IDX 0 199 #define DM_AD_TYPE_IDX 1 200 #define DM_AD_DATA_IDX 2 207 #define DM_URI_SCHEME_HTTP 0x16 208 #define DM_URI_SCHEME_HTTPS 0x17 215 #define DM_GAP_LIM_ADV_TIMEOUT 180000 216 #define DM_GAP_GEN_DISC_SCAN_MIN 10240 217 #define DM_GAP_LIM_DISC_SCAN_MIN 10240 218 #define DM_GAP_CONN_PARAM_TIMEOUT 30000 219 #define DM_GAP_SCAN_FAST_PERIOD 30720 220 #define DM_GAP_ADV_FAST_PERIOD 30000 228 #define DM_GAP_SCAN_FAST_INT_MIN 48 229 #define DM_GAP_SCAN_FAST_INT_MAX 96 230 #define DM_GAP_SCAN_FAST_WINDOW 48 231 #define DM_GAP_SCAN_SLOW_INT_1 2048 232 #define DM_GAP_SCAN_SLOW_WINDOW_1 18 233 #define DM_GAP_SCAN_SLOW_INT_2 4096 234 #define DM_GAP_SCAN_SLOW_WINDOW_2 36 235 #define DM_GAP_ADV_FAST_INT_MIN_1 48 236 #define DM_GAP_ADV_FAST_INT_MAX_1 96 237 #define DM_GAP_ADV_FAST_INT_MIN_2 160 238 #define DM_GAP_ADV_FAST_INT_MAX_2 240 239 #define DM_GAP_ADV_SLOW_INT_MIN 1600 240 #define DM_GAP_ADV_SLOW_INT_MAX 1920 248 #define DM_GAP_SCAN_CODED_FAST_INT_MIN 144 249 #define DM_GAP_SCAN_CODED_FAST_INT_MAX 288 250 #define DM_GAP_SCAN_CODED_FAST_WINDOW 144 251 #define DM_GAP_SCAN_CODED_SLOW_INT_1 6144 252 #define DM_GAP_SCAN_CODED_SLOW_WINDOW_1 54 253 #define DM_GAP_SCAN_CODED_SLOW_INT_2 12288 254 #define DM_GAP_SCAN_CODED_SLOW_WINDOW_2 108 255 #define DM_GAP_ADV_CODED_FAST_INT_MIN_1 144 256 #define DM_GAP_ADV_CODED_FAST_INT_MAX_1 288 257 #define DM_GAP_ADV_CODED_FAST_INT_MIN_2 480 258 #define DM_GAP_ADV_CODED_FAST_INT_MAX_2 720 259 #define DM_GAP_ADV_CODED_SLOW_INT_MIN 4800 260 #define DM_GAP_ADV_CODED_SLOW_INT_MAX 5760 268 #define DM_GAP_CONN_EST_LATENCY 0 275 #define DM_GAP_INITIAL_CONN_INT_MIN 24 276 #define DM_GAP_INITIAL_CONN_INT_MAX 40 283 #define DM_GAP_CONN_EST_MIN_CE_LEN 0 284 #define DM_GAP_CONN_EST_MAX_CE_LEN 0 291 #define DM_GAP_PRIV_DISABLED 0 292 #define DM_GAP_PRIV_ENABLED 1 300 #define DM_DEFAULT_EST_SUP_TIMEOUT 2000 307 #define DM_AUTH_BOND_FLAG SMP_AUTH_BOND_FLAG 308 #define DM_AUTH_MITM_FLAG SMP_AUTH_MITM_FLAG 309 #define DM_AUTH_SC_FLAG SMP_AUTH_SC_FLAG 310 #define DM_AUTH_KP_FLAG SMP_AUTH_KP_FLAG 317 #define DM_KEY_DIST_LTK SMP_KEY_DIST_ENC 318 #define DM_KEY_DIST_IRK SMP_KEY_DIST_ID 319 #define DM_KEY_DIST_CSRK SMP_KEY_DIST_SIGN 326 #define DM_KEY_LOCAL_LTK 0x01 327 #define DM_KEY_PEER_LTK 0x02 328 #define DM_KEY_IRK 0x04 329 #define DM_KEY_CSRK 0x08 333 #define DM_SEC_HCI_ERR_BASE 0x20 339 #define DM_SEC_LEVEL_NONE 0 340 #define DM_SEC_LEVEL_ENC 1 341 #define DM_SEC_LEVEL_ENC_AUTH 2 342 #define DM_SEC_LEVEL_ENC_LESC 3 349 #define DM_RAND_ADDR_STATIC 0xC0 350 #define DM_RAND_ADDR_RESOLV 0x40 351 #define DM_RAND_ADDR_NONRESOLV 0x00 359 #define DM_RAND_ADDR_GET(addr) ((addr)[5] & 0xC0) 362 #define DM_RAND_ADDR_SET(addr, type) {(addr)[5] = ((addr)[5] & 0x3F) | (type);} 365 #define DM_RAND_ADDR_RPA(addr, type) (((type) == DM_ADDR_RANDOM) && \ 366 (DM_RAND_ADDR_GET((addr)) == DM_RAND_ADDR_RESOLV)) 373 #define DM_PRIV_MODE_NETWORK 0x00 374 #define DM_PRIV_MODE_DEVICE 0x01 381 #define DM_CONN_IDLE 0 382 #define DM_CONN_BUSY 1 389 #define DM_IDLE_SMP_PAIR 0x0001 390 #define DM_IDLE_DM_ENC 0x0002 391 #define DM_IDLE_ATTS_DISC 0x0004 392 #define DM_IDLE_APP_DISC 0x0008 393 #define DM_IDLE_USER_1 0x0010 394 #define DM_IDLE_USER_2 0x0020 395 #define DM_IDLE_USER_3 0x0040 396 #define DM_IDLE_USER_4 0x0080 403 #define DM_FILT_POLICY_MODE_ADV 0 404 #define DM_FILT_POLICY_MODE_SCAN 1 405 #define DM_FILT_POLICY_MODE_INIT 2 406 #define DM_FILT_POLICY_MODE_SYNC 3 413 #define DM_ERR_SMP_RX_PDU_LEN_EXCEEDED 0x01 414 #define DM_ERR_ATT_RX_PDU_LEN_EXCEEDED 0x02 415 #define DM_ERR_L2C_RX_PDU_LEN_EXCEEDED 0x03 424 #define DM_ADV_HANDLE_DEFAULT 0 431 #define DM_CBACK_START 0x20 493 #define DM_CBACK_END DM_VENDOR_SPEC_IND uint8_t * DmSecGetLocalCsrk(void)
For internal use only. This function gets the local CSRK used by the device.
void DmScanStop(void)
Stop scanning.
void DmRemoveDeviceFromPerAdvList(uint8_t advAddrType, uint8_t *pAdvAddr, uint8_t advSid)
DM remove device from periodic advertiser list.
void DmPerAdvConfig(uint8_t advHandle)
Set the advertising parameters for periodic advertising.
Remote features from peer device.
bool_t DmDevSetFilterPolicy(uint8_t mode, uint8_t policy)
Set the Advertising, Scanning or Initiator filter policy.
LE read local resolving address command complete event.
Extended scan data received from peer device.
Data type for DM_SEC_PAIR_IND.
uint8_t * DmConnPeerRpa(dmConnId_t connId)
For internal use only. Return the peer resolvable private address (RPA).
bool_t DmAdvModeExt(void)
Whether DM advertising is in extended mode.
bool_t DmAdvSetName(uint8_t len, uint8_t *pValue, uint16_t *pAdvDataLen, uint8_t *pAdvData, uint16_t advDataBufLen)
Set the device name in the given advertising or scan response data. If the name can only fit in the d...
void DmConnUpdate(dmConnId_t connId, hciConnSpec_t *pConnSpec)
Update the connection parameters of an open connection.
uint8_t dmConnId_t
Connection identifier.
uint8_t secLevel
Security level of pairing when key was exchanged.
dmConnId_t DmConnOpen(uint8_t clientId, uint8_t initPhys, uint8_t addrType, uint8_t *pAddr)
Open a connection to a peer device with the given address.
void DmExtConnMasterInit(void)
Initialize DM connection manager for operation as extended master.
void DmAdvIncTxPwr(uint8_t advHandle, bool_t incTxPwr, int8_t advTxPwr)
Set whether or not to include TxPower in extended header of advertising PDU.
hciReadRssiCmdCmplEvt_t readRssi
handles DM_CONN_READ_RSSI_IND
wsfMsgHdr_t hdr
Common header.
uint8_t * DmConnLocalAddr(dmConnId_t connId)
For internal use only. Return the local address.
void DmDevReset(void)
Reset the device.
ECC Security callback parameters structure.
void DmSecCalcOobReq(uint8_t *pRand, uint8_t *pPubKeyX)
This function calculates the local random and confirm values used in LESC OOB pairing. The operation's result is posted as a DM_SEC_CALC_OOB_IND event to the application's DM callback handler. The local rand and confirm values are exchanged with the peer via out-of-band (OOB) methods and passed into the DmSecSetOob after DM_CONN_OPEN_IND.
bool_t DmConnInUse(dmConnId_t connId)
For internal use only. Return TRUE if the connection is in use.
Advertising set(s) started.
void DmPrivClearResList(void)
Clear resolving list. When complete the client's callback function is called with a DM_PRIV_CLEAR_RES...
void DmConnSetDataLen(dmConnId_t connId, uint16_t txOctets, uint16_t txTime)
Set data length for a given connection.
void DmAdvSetFragPref(uint8_t advHandle, uint8_t fragPref)
Set fragment preference for advertising data.
LE connection complete event.
void DmSecSetEccKey(secEccKey_t *pKey)
This function sets the ECC key for use with LESC security.
Write authenticated payload to command complete event.
void DmDevVsInit(uint8_t param)
Vendor-specific controller initialization function.
void DmScanStart(uint8_t scanPhys, uint8_t mode, const uint8_t *pScanType, bool_t filterDup, uint16_t duration, uint16_t period)
Start scanning on the given PHYs.
LE PHY update complete event.
dmSyncId_t DmSyncStart(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...
void DmDevPrivInit(void)
Initialize device privacy module.
Data type for DM_SEC_COMPARE_IND.
Pairing failed or other security failure.
#define SMP_RAND8_LEN
Random 8-byte number length.
hciAuthPayloadToExpiredEvt_t authToExpired
handles DM_CONN_AUTH_TO_EXPIRED_IND
Scan data received from peer device.
Peer resolving address read.
hciLeAddDevToResListCmdCmplEvt_t addDevToResList
handles DM_PRIV_ADD_DEV_TO_RES_LIST_IND
void DmSecSlaveReq(dmConnId_t connId, uint8_t auth)
This function is called by a slave device to request that the master initiates pairing or link encryp...
bool_t DmScanModeExt(void)
Whether DM scanning is in extended mode.
Local resolving address read.
uint8_t * DmFindAdType(uint8_t adType, uint16_t dataLen, uint8_t *pData)
Find an advertising data element in the given advertising or scan response data.
Write authenticated payload complete.
void DmAdvRemoveAdvSet(uint8_t advHandle)
Remove an advertising set.
void DmSecCompareRsp(dmConnId_t connId, bool_t valid)
This function is called by the application in response to a DM_SEC_COMPARE_IND event. The valid parameter indicates if the compare value of the DM_SEC_COMPARE_IND was valid.
dmAdvSetStartEvt_t advSetStart
handles DM_ADV_SET_START_IND
void DmSyncStop(dmSyncId_t syncId)
Stop reception of the periodic advertising identified by the given sync identifier.
uint8_t auth
Authentication and bonding flags.
hciReadRemoteVerInfoCmplEvt_t readRemVerInfo
handles DM_READ_REMOTE_VER_INFO_IND
uint8_t bool_t
Boolean data type.
void DmRegister(dmCback_t cback)
Register a callback with DM for scan and advertising events.
void DmSecAuthRsp(dmConnId_t connId, uint8_t authDataLen, uint8_t *pAuthData)
This function is called in response to a DM_SEC_AUTH_REQ_IND event to provide PIN or OOB data during ...
void DmPrivAddDevToResList(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t *pPeerIrk, uint8_t *pLocalIrk, bool_t enableLlPriv, uint16_t param)
Add device to resolving list. When complete the client's callback function is called with a DM_PRIV_A...
void DmAdvUseLegacyPdu(uint8_t advHandle, bool_t useLegacyPdu)
Set whether or not to use legacy advertising PDUs with extended advertising.
hciLeConnCmplEvt_t connOpen
handles DM_CONN_OPEN_IND
Data type for DM_SEC_SLAVE_REQ_IND.
void DmSecPairRsp(dmConnId_t connId, bool_t oob, uint8_t auth, uint8_t iKeyDist, uint8_t rKeyDist)
This function is called by a slave device to proceed with pairing after a DM_SEC_PAIR_IND event is re...
Data type for DmSecSetOob().
LE add device to resolving list command complete event.
dmSecKeypressIndEvt_t keypressInd
handles DM_SEC_KEYPRESS_IND
uint8_t addrType
Address Type.
uint16_t DmSizeOfEvt(dmEvt_t *pDmEvt)
Return size of a DM callback event.
void DmAdvSetInterval(uint8_t advHandle, uint16_t intervalMin, uint16_t intervalMax)
Set the minimum and maximum advertising intervals.
void DmConnMasterInit(void)
Initialize DM connection manager for operation as legacy master.
Result of ECC Key Generation.
uint8_t * DmSecGetLocalIrk(void)
For internal use only. This function gets the local IRK used by the device.
hciLeAdvReportEvt_t scanReport
handles DM_SCAN_REPORT_IND
hciLeRemDevFromResListCmdCmplEvt_t remDevFromResList
handles DM_PRIV_REM_DEV_FROM_RES_LIST_IND
dmSecPairIndEvt_t pairInd
handles DM_SEC_PAIR_IND
void DmSecPairReq(dmConnId_t connId, bool_t oob, uint8_t auth, uint8_t iKeyDist, uint8_t rKeyDist)
This function is called by a master device to initiate pairing.
dmConnId_t DmConnIdByHandle(uint16_t handle)
For internal use only. Find the connection ID with matching handle.
dmAdvNewAddrIndEvt_t advNewAddr
handles DM_ADV_NEW_ADDR_IND
uint8_t * DmConnLocalRpa(dmConnId_t connId)
For internal use only. Return the local resolvable private address (RPA).
dmSecEncryptIndEvt_t encryptInd
handles DM_SEC_ENCRYPT_IND
void DmPrivSetAddrResEnable(bool_t enable)
Enable or disable address resolution in LL. When complete the client's callback function is called wi...
secEccMsg_t eccMsg
handles DM_SEC_ECC_KEY_IND
Extended scanning started.
void DmPrivSetResolvablePrivateAddrTimeout(uint16_t rpaTimeout)
Set resolvable private address timeout command.
Data structure for DM_ADV_SET_START_IND.
void DmConnSetConnSpec(hciConnSpec_t *pConnSpec)
Set the connection spec parameters for connections to be created with DmConnOpen().
void DmL2cConnUpdateInd(uint8_t identifier, uint16_t handle, hciConnSpec_t *pConnSpec)
For internal use only. L2C calls this function when it receives a connection update request from a pe...
void DmAdvConfig(uint8_t advHandle, uint8_t advType, uint8_t peerAddrType, uint8_t *pPeerAddr)
Set the advertising parameters using the given advertising type, and peer address.
LE remote connetion parameter request event.
#define SMP_KEY_LEN
Key length.
void DmSecLtkRsp(dmConnId_t connId, bool_t keyFound, uint8_t secLevel, uint8_t *pKey)
This function is called by a slave in response to a DM_SEC_LTK_REQ_IND event to provide the long term...
void DmPrivResolveAddr(uint8_t *pAddr, uint8_t *pIrk, uint16_t param)
Resolve a private resolvable address. When complete the client's callback function is called with a D...
uint32_t DmSecGetCompareValue(uint8_t *pConfirm)
This function returns the 6-digit compare value for the specified 128-bit confirm value...
void DmRemoteConnParamReqReply(dmConnId_t connId, hciConnSpec_t *pConnSpec)
Reply to the HCI remote connection parameter request event. This command is used to indicate that the...
hciVendorSpecEvt_t vendorSpec
handles DM_VENDOR_SPEC_IND
Data type for DM_SEC_KEY_IND.
void DmScanInit(void)
Initialize DM legacy scanning.
void DmL2cConnUpdateCnf(uint16_t handle, uint16_t reason)
For internal use only. L2C calls this function to send the result of an L2CAP connection update respo...
hciLeExtAdvReportEvt_t extScanReport
handles DM_EXT_SCAN_REPORT_IND
void DmSecGenerateEccKeyReq(void)
This function generates an ECC key for use with LESC security.
Pairing completed successfully.
PIN or OOB data requested for pairing.
hciLeReadRemoteFeatCmplEvt_t readRemoteFeat
handles DM_REMOTE_FEATURES_IND
hciLeConnUpdateCmplEvt_t connUpdate
handles DM_CONN_UPDATE_IND
dmSecCnfIndEvt_t cnfInd
handles DM_SEC_COMPARE_IND
Device removed from resolving list.
hciLeScanReqRcvdEvt_t scanReqRcvd
handles DM_SCAN_REQ_RCVD_IND
void DmSecEncryptReq(dmConnId_t connId, uint8_t secLevel, dmSecLtk_t *pLtk)
This function is called by a master device to initiate link encryption.
void DmSmpEncryptReq(dmConnId_t connId, uint8_t secLevel, uint8_t *pKey)
For internal use only. This function is called by SMP to request encryption.
bool_t DmAdvModeLeg(void)
Whether DM advertising is in legacy mode.
LE extended advertising report.
dmConnId_t DmConnAccept(uint8_t clientId, uint8_t advHandle, uint8_t advType, uint16_t duration, uint8_t maxEaEvents, uint8_t addrType, uint8_t *pAddr)
Accept a connection from the given peer device by initiating directed advertising.
void DmExtConnSetScanInterval(uint8_t initPhys, uint16_t *pScanInterval, uint16_t *pScanWindow)
Set the scan interval and window for extended connections to be created with DmConnOpen().
bool_t DmLlPrivEnabled(void)
Whether LL Privacy is enabled.
#define SMP_CONFIRM_LEN
Confirm number length.
void DmAdvSetAddrType(uint8_t addrType)
Set the local address type used while advertising. This function can be used to configure advertising...
void DmAdvStart(uint8_t numSets, uint8_t *pAdvHandles, uint16_t *pDuration, uint8_t *pMaxEaEvents)
Start advertising using the given advertising set and duration.
LE set default PHY command complete event.
void DmPerAdvSetInterval(uint8_t advHandle, uint16_t intervalMin, uint16_t intervalMax)
Set the minimum and maximum advertising intervals for periodic advertising.
void DmWriteAuthPayloadTimeout(dmConnId_t connId, uint16_t timeout)
Set authenticated payload timeout for a given connection.
void DmPerAdvSetData(uint8_t advHandle, uint8_t op, uint8_t len, uint8_t *pData)
Set the advertising data to the given data for periodic advertising.
void DmSecSetOob(dmConnId_t connId, dmSecLescOobCfg_t *pConfig)
This function configures the DM to use OOB pairing for the given connection. The pRand and pConfirm c...
Result of Just Works/Numeric Comparison Compare Value Calculation.
void DmDevPrivStop(void)
Stop using a private resolvable address.
bool_t firstTime
TRUE when address is generated for the first time.
void DmSecSetLocalCsrk(uint8_t *pCsrk)
This function sets the local CSRK used by the device.
uint8_t auth
Authentication and bonding flags.
void DmConnSlaveInit(void)
Initialize DM connection manager for operation as legacy slave.
void DmAdvInit(void)
Initialize DM legacy advertising.
void DmConnRegister(uint8_t clientId, dmCback_t cback)
Register with the DM connection manager.
hciLeRemConnParamReqEvt_t remConnParamReq
handles DM_REM_CONN_PARAM_REQ_IND
Periodic advertising sync lost.
Data type for DM_SEC_KEYPRESS_IND.
void DmScanSetInterval(uint8_t scanPhys, uint16_t *pScanInterval, uint16_t *pScanWindow)
Set the scan interval and window for the specified PHYs.
uint8_t dmSyncId_t
Synchronization identifier.
uint8_t notificationType
Type of keypress notification.
LE periodic advertising report.
dmSecPairCmplIndEvt_t pairCmpl
handles DM_SEC_PAIR_CMPL_IND
hciReadLocalVerInfo_t readLocVerInfo
handles DM_READ_LOCAL_VER_INFO_IND
void DmSetDefaultPhy(uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys)
Set the preferred values for the transmitter PHY and receiver PHY for all subsequent connections...
void DmExtAdvInit(void)
Initialize DM extended advertising.
uint8_t encKeyLen
Length of encryption key used when data was transferred.
Union of DM callback event data types.
hciDisconnectCmplEvt_t connClose
handles DM_CONN_CLOSE_IND
Data type for DM_SEC_PAIR_CMPL_IND.
Data type for DM_SEC_CALC_OOB_IND.
void DmAdvSetChannelMap(uint8_t advHandle, uint8_t channelMap)
Include or exclude certain channels from the advertising channel map.
void DmAdvSetData(uint8_t advHandle, uint8_t op, uint8_t location, uint8_t len, uint8_t *pData)
Set the advertising or scan response data to the given data.
Authenticated payload to expire event.
ECC Security public/private key pair.
uint8_t DmConnSecLevel(dmConnId_t connId)
For internal use only. Return the security level of the connection.
hciLePerAdvSyncEstEvt_t perAdvSyncEst
handles DM_PER_ADV_SYNC_EST_IND
dmSecOobCalcIndEvt_t oobCalcInd
handles DM_SEC_CALC_OOB_IND
void DmReadRemoteFeatures(dmConnId_t connId)
For internal use only. Read the features of the remote device.
dmSecKey_t keyData
Key data.
void DmDevWhiteListRemove(uint8_t addrType, uint8_t *pAddr)
Remove a peer device from the white list. Note that this function cannot be called while advertising...
uint8_t advHandle
Advertising handle.
hciWriteAuthPayloadToCmdCmplEvt_t writeAuthTo
handles DM_CONN_WRITE_AUTH_TO_IND
void DmSecSetDebugEccKey(void)
This function sets the ECC key for use with LESC security to standard debug keys values.
New resolvable address has been generated.
Read remote version information complete event.
bdAddr_t addr
New resolvable private address.
void DmPrivSetPrivacyMode(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t mode)
Set privacy mode for a given entry in the resolving list.
void DmPerAdvStop(uint8_t advHandle)
Stop periodic advertising for the advertising set specified by the advertising handle.
Connection specification type.
void DmSecInit(void)
Initialize DM security.
LE connection update complete event.
void DmConnClose(uint8_t clientId, dmConnId_t connId, uint8_t reason)
Close the connection with the give connection identifier.
unsigned long uint32_t
Unsigned 32-bit value.
uint16_t DmConnCheckIdle(dmConnId_t connId)
Check if a connection is idle.
bool_t DmDevSetExtFilterPolicy(uint8_t advHandle, uint8_t mode, uint8_t policy)
Set the Advertising filter policy for the given advertising, Scanning or Initiator filter policy...
hciLeReadLocalResAddrCmdCmplEvt_t readLocalResAddr
handles DM_PRIV_READ_LOCAL_RES_ADDR_IND
#define DM_NUM_ADV_SETS
Number of supported advertising sets: must be set to 1 for legacy advertising.
uint8_t * DmConnPeerAddr(dmConnId_t connId)
For internal use only. Return the peer device address.
Keypress indication from peer in passkey security.
#define SMP_RAND_LEN
Random number length.
Periodic advertising set stopped.
void DmConnSetScanInterval(uint16_t scanInterval, uint16_t scanWindow)
Set the scan interval and window for connections to be created with DmConnOpen(). ...
void DmReadPhy(dmConnId_t connId)
Read the current transmitter PHY and receiver PHY for a given connection.
void DmPrivReadLocalResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr)
Read local resolvable address command. When complete the client's callback function is called with a ...
void DmDevPrivStart(uint16_t changeInterval)
Start using a private resolvable address.
Periodic advertising sync established.
LE clear resolving list command complete event.
LE data length change event.
LTK requested for encyption.
hciLeAdvSetTermEvt_t advSetStop
handles DM_ADV_SET_STOP_IND
hciLeLtkReqEvt_t ltkReqInd
handles DM_SEC_LTK_REQ_IND
uint8_t auth
Authentication and bonding flags.
uint8_t DmLlAddrType(uint8_t addrType)
Map an address type to a type used by LL.
void(* dmCback_t)(dmEvt_t *pDmEvt)
Callback type.
hciLeSetDefPhyCmdCmplEvt_t setDefPhy
handles DM_PHY_SET_DEF_IND
Security manager constants and definitions from the Bluetooth specification.
void DmAdvOmitAdvAddr(uint8_t advHandle, bool_t omitAdvAddr)
Set whether or not to omit advertiser's address from all PDUs (anonymous advertising).
dmPerAdvSetStopEvt_t perAdvSetStop
handles DM_PER_ADV_SET_STOP_IND
uint8_t iKeyDist
Initiator key distribution flags.
dmSecSlaveIndEvt_t slaveInd
handles DM_SEC_SLAVE_REQ_IND
bool_t DmScanModeLeg(void)
Whether DM scanning is in legacy mode.
bool_t DmAdvSetAdValue(uint8_t adType, uint8_t len, uint8_t *pValue, uint16_t *pAdvDataLen, uint8_t *pAdvData, uint16_t advDataBufLen)
Set the value of an advertising data element in the given advertising or scan response data...
bool_t oob
Out-of-band data requested.
uint8_t bdAddr_t[BDA_ADDR_LEN]
BD address data type.
hciLePerAdvReportEvt_t perAdvReport
handles DM_PER_ADV_REPORT_IND
void DmDevSetRandAddr(uint8_t *pAddr)
Set the random address to be used by the local device.
LE read PHY command complete event.
void DmAdvSetRandAddr(uint8_t advHandle, const uint8_t *pAddr)
Set the random device address for a given advertising set.
Data structure for DM_PER_ADV_SET_START_IND.
void DmConnSetAddrType(uint8_t addrType)
Set the local address type used for connections created with DmConnOpen().
dmSecKeyIndEvt_t keyInd
handles DM_SEC_KEY_IND
void DmPerAdvIncTxPwr(uint8_t advHandle, bool_t incTxPwr)
Set whether or not to include TxPower in extended header of advertising PDU for periodic advertising...
Data structure for DM_PER_ADV_SET_STOP_IND.
dmSecAuthReqIndEvt_t authReq
handles DM_SEC_AUTH_REQ_IND
LE set address resolving enable command complete event.
Device added to resolving list.
uint8_t numSets
Number of advertising sets.
Extended scanning stopped.
bool_t oob
Out-of-band pairing data present or not present.
LE read peer resolving address command complete event.
void DmAdvClearAdvSets(void)
Clear advertising sets.
void DmScanSetAddrType(uint8_t addrType)
Set the local address type used while scanning. This function can be used to configure scanning to us...
Result of OOB Confirm Calculation Generation.
void DmSetPhy(dmConnId_t connId, uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys, uint16_t phyOptions)
Set the PHY preferences for a given connection.
Read local version information complete event.
void DmClearPerAdvList(void)
DM clear periodic advertiser list.
void DmPrivInit(void)
Initialize DM privacy module.
uint8_t DmConnRole(dmConnId_t connId)
Return the connection role indicating master or slave.
void DmAdvScanReqNotifEnable(uint8_t advHandle, bool_t scanReqNotifEna)
Set scan request notification enable.
Data type for DM_ADV_NEW_ADDR_IND.
LE scan request received.
LE remove device from resolving list command complete event.
Data type for DM_SEC_ENCRYPT_IND.
bool_t usingLtk
TRUE if connection encrypted with LTK.
uint8_t DmConnPeerAddrType(dmConnId_t connId)
For internal use only. Return the peer address type.
LE advertising report event.
void DmDevWhiteListAdd(uint8_t addrType, uint8_t *pAddr)
Add a peer device to the white list. Note that this function cannot be called while advertising...
void DmConnInit(void)
Initialize DM connection manager.
void DmExtConnSetConnSpec(uint8_t initPhys, hciConnSpec_t *pConnSpec)
Set the extended connection spec parameters for extended connections to be created with DmConnOpen()...
Incoming pairing request from master.
unsigned short uint16_t
Unsigned 16-bit value.
#define DM_CBACK_START
DM callback event starting value.
void DmConnSetIdle(dmConnId_t connId, uint16_t idleMask, uint8_t idle)
Configure a bit in the connection idle state mask as busy or idle.
Private address resolved.
void DmSecSetLocalIrk(uint8_t *pIrk)
This function sets the local IRK used by the device.
void DmPrivReadPeerResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr)
HCI read peer resolvable address command. When complete the client's callback function is called with...
Data type for DM_SEC_AUTH_REQ_IND.
Address resolving enable set.
hciLeReadPeerResAddrCmdCmplEvt_t readPeerResAddr
handles DM_PRIV_READ_PEER_RES_ADDR_IND
Disconnect complete event.
bool_t display
TRUE if pin is to be displayed.
Periodic advertising data received from peer device.
uint8_t advHandle
Advertising handle.
Local LL version information read.
void DmDevWhiteListClear(void)
Clear the white list. Note that this function cannot be called while advertising, scanning...
void DmPerAdvStart(uint8_t advHandle)
Start periodic advertising for the advertising set specified by the advertising handle.
secEccKey_t * DmSecGetEccKey(void)
This function gets the local ECC key for use with LESC security.
void DmAdvSetPhyParam(uint8_t advHandle, uint8_t priAdvPhy, uint8_t secAdvMaxSkip, uint8_t secAdvPhy)
Set extended advertising PHY parameters.
LE read remote features complete event.
hciLePerAdvSyncLostEvt_t perAdvSyncLost
handles DM_PER_ADV_SYNC_LOST_IND
Remote LL version information read.
hciLeClearResListCmdCmplEvt_t clearResList
handles DM_PRIV_CLEAR_RES_LIST_IND
uint8_t DmHostAddrType(uint8_t addrType)
Map an address type to a type used by Host.
void DmAdvStop(uint8_t numSets, uint8_t *pAdvHandles)
Stop advertising for the given advertising set. If the number of sets is set to 0 then all advertisin...
void DmExtConnSlaveInit(void)
Initialize DM connection manager for operation as extended slave.
LE periodic advertising sync established.
void DmAddDeviceToPerAdvList(uint8_t advAddrType, uint8_t *pAdvAddr, uint8_t advSid)
Add device to periodic advertiser list.
Authenticated payload timeout expired.
hciLePhyUpdateEvt_t phyUpdate
handles DM_PHY_UPDATE_IND
Connection update complete.
void DmSecCancelReq(dmConnId_t connId, uint8_t reason)
This function is called to cancel the pairing process.
void DmSecLescInit(void)
Initialize DM LE Secure Connections security.
dmPerAdvSetStartEvt_t perAdvSetStart
handles DM_PER_ADV_SET_START_IND
void DmSmpCbackExec(dmEvt_t *pDmEvt)
For internal use only. Execute DM callback from SMP procedures.
bdAddr_t bdAddr
BD Address.
hciLeDataLenChangeEvt_t dataLenChange
handles DM_CONN_DATA_LEN_CHANGE_IND
uint8_t rKeyDist
Responder key distribution flags.
hciHwErrorEvt_t hwError
handles DM_HW_ERROR_IND
Common message structure passed to event handler.
Periodic advertising set started.
Remote connection parameter requested.
void DmPrivRemDevFromResList(uint8_t addrType, const uint8_t *pIdentityAddr, uint16_t param)
Remove device from resolving list. When complete the client's callback function is called with a DM_P...
hciLeSetAddrResEnableCmdCmplEvt_t setAddrResEnable
handles DM_PRIV_SET_ADDR_RES_ENABLE_IND
AES and random number security service API.
void DmRemoteConnParamReqNegReply(dmConnId_t connId, uint8_t reason)
Negative reply to the HCI remote connection parameter request event. This command is used to indicate...
void DmExtScanInit(void)
Initialize DM extended scanning.
void DmPhyInit(void)
Initialize DM PHY.
unsigned char uint8_t
Unsigned 8-bit value.
hciLeReadPhyCmdCmplEvt_t readPhy
handles DM_PHY_READ_IND
uint8_t dummy
Placeholder variable.
Incoming security request from slave.
LE advertising set terminated.
LE periodic advertising synch lost.
Advertising set(s) stopped.
void DmConnReadRssi(dmConnId_t connId)
Read RSSI of a given connection.
uint8_t DmConnLocalAddrType(dmConnId_t connId)
For internal use only. Return the local address type.
signed char int8_t
Signed 8-bit value.