Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: BLE_Thermometer MAXWSNENV_demo
dm_api.h
00001 /*************************************************************************************************/ 00002 /*! 00003 * \file dm_api.h 00004 * 00005 * \brief Device Manager subsystem API. 00006 * 00007 * $Date: 2012-09-11 16:18:57 -0700 (Tue, 11 Sep 2012) $ 00008 * $Revision: 349 $ 00009 * 00010 * Copyright (c) 2009-2016 ARM Limited. All rights reserved. 00011 * 00012 * SPDX-License-Identifier: LicenseRef-PBL 00013 * 00014 * Licensed under the Permissive Binary License, Version 1.0 (the "License"); you may not use 00015 * this file except in compliance with the License. You may obtain a copy of the License at 00016 * 00017 * https://www.mbed.com/licenses/PBL-1.0 00018 * 00019 * See the License for the specific language governing permissions and limitations under the License. 00020 */ 00021 /*************************************************************************************************/ 00022 #ifndef DM_API_H 00023 #define DM_API_H 00024 00025 #include "hci_api.h" 00026 #include "cfg_stack.h" 00027 #include "smp_defs.h" 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 /************************************************************************************************** 00034 Macros 00035 **************************************************************************************************/ 00036 00037 /*! Device role */ 00038 #define DM_ROLE_MASTER HCI_ROLE_MASTER /*! Role is master */ 00039 #define DM_ROLE_SLAVE HCI_ROLE_SLAVE /*! Role is slave */ 00040 00041 /*! The GAP discovery mode */ 00042 #define DM_DISC_MODE_NONE 0 /*! GAP non-discoverable */ 00043 #define DM_DISC_MODE_LIMITED 1 /*! GAP limited discoverable mode */ 00044 #define DM_DISC_MODE_GENERAL 2 /*! GAP general discoverable mode */ 00045 00046 /*! The type of connectable or discoverable of advertising */ 00047 #define DM_ADV_CONN_UNDIRECT 0 /*! Connectable undirected advertising */ 00048 #define DM_ADV_CONN_DIRECT 1 /*! Connectable directed advertising */ 00049 #define DM_ADV_DISC_UNDIRECT 2 /*! Discoverable undirected advertising */ 00050 #define DM_ADV_NONCONN_UNDIRECT 3 /*! Non-connectable undirected advertising */ 00051 #define DM_ADV_SCAN_RESPONSE 4 /*! Scan response */ 00052 #define DM_ADV_NONE 255 /*! For internal use only */ 00053 00054 /*! Whether data is located in the advertising data or the scan response data */ 00055 #define DM_DATA_LOC_ADV 0 /*! Locate data in the advertising data */ 00056 #define DM_DATA_LOC_SCAN 1 /*! Locate data in the scan response data */ 00057 00058 /*! The scan type */ 00059 #define DM_SCAN_TYPE_PASSIVE 0 /*! Passive scan */ 00060 #define DM_SCAN_TYPE_ACTIVE 1 /*! Active scan */ 00061 00062 /*! Advertising channel map */ 00063 #define DM_ADV_CHAN_37 HCI_ADV_CHAN_37 /*! Advertising channel 37 */ 00064 #define DM_ADV_CHAN_38 HCI_ADV_CHAN_38 /*! Advertising channel 38 */ 00065 #define DM_ADV_CHAN_39 HCI_ADV_CHAN_39 /*! Advertising channel 39 */ 00066 #define DM_ADV_CHAN_ALL (HCI_ADV_CHAN_37 | HCI_ADV_CHAN_38 | HCI_ADV_CHAN_39) 00067 00068 /*! The client ID parameter to function DmConnRegister() */ 00069 #define DM_CLIENT_ID_ATT 0 /*! Identifier for attribute protocol, for internal use only */ 00070 #define DM_CLIENT_ID_SMP 1 /*! Identifier for security manager protocol, for internal use only */ 00071 #define DM_CLIENT_ID_DM 2 /*! Identifier for device manager, for internal use only */ 00072 #define DM_CLIENT_ID_APP 3 /*! Identifier for the application */ 00073 #define DM_CLIENT_ID_MAX 4 /*! For internal use only */ 00074 00075 /*! Unknown connection ID or other error */ 00076 #define DM_CONN_ID_NONE 0 00077 00078 /*! The address type */ 00079 #define DM_ADDR_PUBLIC 0 /*! Public address */ 00080 #define DM_ADDR_RANDOM 1 /*! Random address */ 00081 00082 /*! Advertising data types */ 00083 #define DM_ADV_TYPE_FLAGS 0x01 /*! Flag bits */ 00084 #define DM_ADV_TYPE_16_UUID_PART 0x02 /*! Partial list of 16 bit UUIDs */ 00085 #define DM_ADV_TYPE_16_UUID 0x03 /*! Complete list of 16 bit UUIDs */ 00086 #define DM_ADV_TYPE_128_UUID_PART 0x06 /*! Partial list of 128 bit UUIDs */ 00087 #define DM_ADV_TYPE_128_UUID 0x07 /*! Complete list of 128 bit UUIDs */ 00088 #define DM_ADV_TYPE_SHORT_NAME 0x08 /*! Shortened local name */ 00089 #define DM_ADV_TYPE_LOCAL_NAME 0x09 /*! Complete local name */ 00090 #define DM_ADV_TYPE_TX_POWER 0x0A /*! TX power level */ 00091 #define DM_ADV_TYPE_CONN_INTERVAL 0x12 /*! Slave preferred connection interval */ 00092 #define DM_ADV_TYPE_SIGNED_DATA 0x13 /*! Signed data */ 00093 #define DM_ADV_TYPE_16_SOLICIT 0x14 /*! Service soliticiation list of 16 bit UUIDs */ 00094 #define DM_ADV_TYPE_128_SOLICIT 0x15 /*! Service soliticiation list of 128 bit UUIDs */ 00095 #define DM_ADV_TYPE_SERVICE_DATA 0x16 /*! Service data */ 00096 #define DM_ADV_TYPE_PUBLIC_TARGET 0x17 /*! Public target address */ 00097 #define DM_ADV_TYPE_RANDOM_TARGET 0x18 /*! Random target address */ 00098 #define DM_ADV_TYPE_APPEARANCE 0x19 /*! Device appearance */ 00099 #define DM_ADV_TYPE_MANUFACTURER 0xFF /*! Manufacturer specific data */ 00100 00101 /*! Bit mask for flags advertising data type */ 00102 #define DM_FLAG_LE_LIMITED_DISC 0x01 /*! Limited discoverable flag */ 00103 #define DM_FLAG_LE_GENERAL_DISC 0x02 /*! General discoverable flag */ 00104 #define DM_FLAG_LE_BREDR_NOT_SUP 0x04 /*! BR/EDR not supported flag */ 00105 00106 /*! Advertising data element indexes */ 00107 #define DM_AD_LEN_IDX 0 /*! Advertising data element len */ 00108 #define DM_AD_TYPE_IDX 1 /*! Advertising data element type */ 00109 #define DM_AD_DATA_IDX 2 /*! Advertising data element data */ 00110 00111 /*! Timeouts defined by the GAP specification; in units of milliseconds */ 00112 #define DM_GAP_LIM_ADV_TIMEOUT 180000 /*! Maximum advertising duration in limited discoverable mode */ 00113 #define DM_GAP_GEN_DISC_SCAN_MIN 10240 /*! Minimum scan duration for general discovery */ 00114 #define DM_GAP_LIM_DISC_SCAN_MIN 10240 /*! Minimum scan duration for limited discovery */ 00115 #define DM_GAP_CONN_PARAM_TIMEOUT 30000 /*! Connection parameter update timeout */ 00116 #define DM_GAP_SCAN_FAST_PERIOD 30720 /*! Minimum time to perform scanning when user initiated */ 00117 #define DM_GAP_ADV_FAST_PERIOD 30000 /*! Minimum time to perform advertising when user initiated */ 00118 00119 /*! 00120 * Advertising, scanning, and connection parameters defined in the GAP specification. 00121 * In units of 625 microseconds. 00122 */ 00123 #define DM_GAP_SCAN_FAST_INT_MIN 48 /*! Minimum scan interval when user initiated */ 00124 #define DM_GAP_SCAN_FAST_INT_MAX 96 /*! Maximum scan interval when user initiated */ 00125 #define DM_GAP_SCAN_FAST_WINDOW 48 /*! Scan window when user initiated */ 00126 #define DM_GAP_SCAN_SLOW_INT_1 2048 /*! Scan interval 1 when background scannning */ 00127 #define DM_GAP_SCAN_SLOW_WINDOW_1 18 /*! Scan window 1 when background scanning */ 00128 #define DM_GAP_SCAN_SLOW_INT_2 4096 /*! Scan interval 2 when background scannning */ 00129 #define DM_GAP_SCAN_SLOW_WINDOW_2 18 /*! Scan window 2 when background scanning */ 00130 #define DM_GAP_ADV_FAST_INT_MIN 48 /*! Minimum advertising interval when user initiated */ 00131 #define DM_GAP_ADV_FAST_INT_MAX 96 /*! Maximum advertising interval when user initiated */ 00132 #define DM_GAP_ADV_SLOW_INT_MIN 1600 /*! Minimum advertising interval when background advertising */ 00133 #define DM_GAP_ADV_SLOW_INT_MAX 1920 /*! Maximum advertising interval when background advertising */ 00134 00135 /*! GAP connection establishment latency */ 00136 #define DM_GAP_CONN_EST_LATENCY 0 00137 00138 /*! GAP connection intervals in 1.25ms units */ 00139 #define DM_GAP_INITIAL_CONN_INT_MIN 24 /*! Minimum initial connection interval */ 00140 #define DM_GAP_INITIAL_CONN_INT_MAX 40 /*! Maximum initial onnection interval */ 00141 00142 /*! GAP connection establishment minimum and maximum connection event lengths */ 00143 #define DM_GAP_CONN_EST_MIN_CE_LEN 0 00144 #define DM_GAP_CONN_EST_MAX_CE_LEN 0 00145 00146 /*! GAP peripheral privacy flag characteristic values */ 00147 #define DM_GAP_PRIV_DISABLED 0 00148 #define DM_GAP_PRIV_ENABLED 1 00149 00150 /*! Connection establishment supervision timeout default, in 10ms units */ 00151 #define DM_DEFAULT_EST_SUP_TIMEOUT 2000 00152 00153 /*! Pairing authentication/security properties bit mask */ 00154 #define DM_AUTH_BOND_FLAG SMP_AUTH_BOND_FLAG /*! Bonding requested */ 00155 #define DM_AUTH_MITM_FLAG SMP_AUTH_MITM_FLAG /*! MITM (authenticated pairing) requested */ 00156 00157 /*! Key distribution bit mask */ 00158 #define DM_KEY_DIST_LTK SMP_KEY_DIST_ENC /*! Distribute LTK used for encryption */ 00159 #define DM_KEY_DIST_IRK SMP_KEY_DIST_ID /*! Distribute IRK used for privacy */ 00160 #define DM_KEY_DIST_CSRK SMP_KEY_DIST_SIGN /*! Distribute CSRK used for signed data */ 00161 00162 /*! Key type used in DM_SEC_KEY_IND */ 00163 #define DM_KEY_LOCAL_LTK 0x01 /*! LTK generated locally for this device */ 00164 #define DM_KEY_PEER_LTK 0x02 /*! LTK received from peer device */ 00165 #define DM_KEY_IRK 0x04 /*! IRK and identity info of peer device */ 00166 #define DM_KEY_CSRK 0x08 /*! CSRK of peer device */ 00167 00168 /*! Base value for HCI error status values for DM_SEC_PAIR_CMPL_IND */ 00169 #define DM_SEC_HCI_ERR_BASE 0x20 00170 00171 #define DM_SEC_LEVEL_NONE 0 /*! Connection has no security */ 00172 #define DM_SEC_LEVEL_ENC 1 /*! Connection is encrypted with unauthenticated key */ 00173 #define DM_SEC_LEVEL_ENC_AUTH 2 /*! Connection is encrypted with authenticated key */ 00174 00175 /*! Random address types */ 00176 #define DM_RAND_ADDR_STATIC 0xC0 /*! Static address */ 00177 #define DM_RAND_ADDR_RESOLV 0x80 /*! Resolvable private address */ 00178 #define DM_RAND_ADDR_NONRESOLV 0x00 /*! Non-resolvable private address */ 00179 00180 /*! Get the type of random address */ 00181 #define DM_RAND_ADDR_GET(addr) ((addr)[5] & 0xC0) 00182 00183 /*! Set the type of random address */ 00184 #define DM_RAND_ADDR_SET(addr, type) {(addr)[5] = ((addr)[5] & 0x3F) | (type);} 00185 00186 /*! Connection busy/idle state */ 00187 #define DM_CONN_IDLE 0 /*! Connection is idle */ 00188 #define DM_CONN_BUSY 1 /*! Connection is busy */ 00189 00190 /*! Connection busy/idle state bitmask */ 00191 #define DM_IDLE_SMP_PAIR 0x0001 /*! SMP pairing in progress */ 00192 #define DM_IDLE_DM_ENC 0x0002 /*! DM Encryption setup in progress */ 00193 #define DM_IDLE_ATTS_DISC 0x0004 /*! ATTS service discovery in progress */ 00194 #define DM_IDLE_APP_DISC 0x0008 /*! App framework service discovery in progress */ 00195 #define DM_IDLE_USER_1 0x0010 /*! For use by user application */ 00196 #define DM_IDLE_USER_2 0x0020 /*! For use by user application */ 00197 #define DM_IDLE_USER_3 0x0040 /*! For use by user application */ 00198 #define DM_IDLE_USER_4 0x0080 /*! For use by user application */ 00199 00200 /*! DM callback events */ 00201 #define DM_CBACK_START 0x20 /*! DM callback event starting value */ 00202 enum 00203 { 00204 DM_RESET_CMPL_IND = DM_CBACK_START, /*! Reset complete */ 00205 DM_ADV_START_IND , /*! Advertising started */ 00206 DM_ADV_STOP_IND , /*! Advertising stopped */ 00207 DM_ADV_NEW_ADDR_IND , /*! New resolvable address has been generated */ 00208 DM_SCAN_START_IND , /*! Scanning started */ 00209 DM_SCAN_STOP_IND , /*! Scanning stopped */ 00210 DM_SCAN_REPORT_IND , /*! Scan data received from peer device */ 00211 DM_CONN_OPEN_IND , /*! Connection opened */ 00212 DM_CONN_CLOSE_IND , /*! Connection closed */ 00213 DM_CONN_UPDATE_IND , /*! Connection update complete */ 00214 DM_SEC_PAIR_CMPL_IND , /*! Pairing completed successfully */ 00215 DM_SEC_PAIR_FAIL_IND , /*! Pairing failed or other security failure */ 00216 DM_SEC_ENCRYPT_IND , /*! Connection encrypted */ 00217 DM_SEC_ENCRYPT_FAIL_IND , /*! Encryption failed */ 00218 DM_SEC_AUTH_REQ_IND , /*! PIN or OOB data requested for pairing */ 00219 DM_SEC_KEY_IND , /*! Security key indication */ 00220 DM_SEC_LTK_REQ_IND , /*! LTK requested for encyption */ 00221 DM_SEC_PAIR_IND , /*! Incoming pairing request from master */ 00222 DM_SEC_SLAVE_REQ_IND , /*! Incoming security request from slave */ 00223 DM_PRIV_RESOLVED_ADDR_IND , /*! Private address resolved */ 00224 DM_HW_ERROR_IND , /*! Hardware Error */ 00225 DM_VENDOR_SPEC_IND , /*! Vendor specific event */ 00226 }; 00227 00228 #define DM_CBACK_END DM_VENDOR_SPEC_IND /*! DM callback event ending value */ 00229 00230 /************************************************************************************************** 00231 Data Types 00232 **************************************************************************************************/ 00233 00234 /*! Connection identifier */ 00235 typedef uint8_t dmConnId_t ; 00236 00237 /*! Configuration structure */ 00238 typedef struct 00239 { 00240 uint8_t dummy; 00241 } dmCfg_t ; 00242 00243 /*! LTK data type */ 00244 typedef struct 00245 { 00246 uint8_t key[SMP_KEY_LEN]; 00247 uint8_t rand[SMP_RAND8_LEN]; 00248 uint16_t ediv; 00249 } dmSecLtk_t ; 00250 00251 /*! IRK data type */ 00252 typedef struct 00253 { 00254 uint8_t key[SMP_KEY_LEN]; 00255 bdAddr_t bdAddr; 00256 uint8_t addrType; 00257 } dmSecIrk_t ; 00258 00259 /*! CSRK data type */ 00260 typedef struct 00261 { 00262 uint8_t key[SMP_KEY_LEN]; 00263 } dmSecCsrk_t ; 00264 00265 /*! union of key types */ 00266 typedef union 00267 { 00268 dmSecLtk_t ltk; 00269 dmSecIrk_t irk; 00270 dmSecCsrk_t csrk; 00271 } dmSecKey_t ; 00272 00273 /*! Data type for DM_SEC_PAIR_CMPL_IND */ 00274 typedef struct 00275 { 00276 wsfMsgHdr_t hdr; /*! Header */ 00277 uint8_t auth ; /*! Authentication and bonding flags */ 00278 } dmSecPairCmplIndEvt_t ; 00279 00280 /*! Data type for DM_SEC_ENCRYPT_IND */ 00281 typedef struct 00282 { 00283 wsfMsgHdr_t hdr; /*! Header */ 00284 bool_t usingLtk ; /*! TRUE if connection encrypted with LTK */ 00285 } dmSecEncryptIndEvt_t ; 00286 00287 /*! Data type for DM_SEC_AUTH_REQ_IND */ 00288 typedef struct 00289 { 00290 wsfMsgHdr_t hdr; /*! Header */ 00291 bool_t oob ; /*! Out-of-band data requested */ 00292 bool_t display ; /*! TRUE if pin is to be displayed */ 00293 } dmSecAuthReqIndEvt_t ; 00294 00295 /*! Data type for DM_SEC_PAIR_IND */ 00296 typedef struct 00297 { 00298 wsfMsgHdr_t hdr; /*! Header */ 00299 uint8_t auth ; /*! Authentication and bonding flags */ 00300 bool_t oob ; /*! Out-of-band pairing data present or not present */ 00301 uint8_t iKeyDist ; /*! Initiator key distribution flags */ 00302 uint8_t rKeyDist ; /*! Responder key distribution flags */ 00303 } dmSecPairIndEvt_t ; 00304 00305 /*! Data type for DM_SEC_SLAVE_REQ_IND */ 00306 typedef struct 00307 { 00308 wsfMsgHdr_t hdr; /*! Header */ 00309 uint8_t auth ; /*! Authentication and bonding flags */ 00310 } dmSecSlaveIndEvt_t ; 00311 00312 /*! Data type for DM_SEC_KEY_IND */ 00313 typedef struct 00314 { 00315 wsfMsgHdr_t hdr; /*! Header */ 00316 dmSecKey_t keyData ; /*! Key data */ 00317 uint8_t type ; /*! Key type */ 00318 uint8_t secLevel ; /*! Security level of pairing when key was exchanged */ 00319 uint8_t encKeyLen ; /*! Length of encryption key used when data was transferred */ 00320 } dmSecKeyIndEvt_t ; 00321 00322 /*! Data type for DM_ADV_NEW_ADDR_IND */ 00323 typedef struct 00324 { 00325 wsfMsgHdr_t hdr; /*! Header */ 00326 bdAddr_t addr ; /*! New resolvable private address */ 00327 bool_t firstTime ; /*! TRUE when address is generated for the first time */ 00328 } dmAdvNewAddrIndEvt_t ; 00329 00330 /*! Union of DM callback event data types */ 00331 typedef union 00332 { 00333 wsfMsgHdr_t hdr; 00334 hciLeAdvReportEvt_t scanReport; 00335 hciLeConnCmplEvt_t connOpen; 00336 hciLeConnUpdateCmplEvt_t connUpdate; 00337 hciDisconnectCmplEvt_t connClose; 00338 dmSecPairCmplIndEvt_t pairCmpl; 00339 dmSecEncryptIndEvt_t encryptInd; 00340 dmSecAuthReqIndEvt_t authReq; 00341 dmSecPairIndEvt_t pairInd; 00342 dmSecSlaveIndEvt_t slaveInd; 00343 dmSecKeyIndEvt_t keyInd; 00344 hciLeLtkReqEvt_t ltkReqInd; 00345 hciVendorSpecEvt_t vendorSpec; 00346 dmAdvNewAddrIndEvt_t advNewAddr; 00347 } dmEvt_t ; 00348 00349 /*! Callback type */ 00350 typedef void (*dmCback_t )(dmEvt_t *pDmEvt); 00351 00352 /************************************************************************************************** 00353 Function Declarations 00354 **************************************************************************************************/ 00355 00356 /*************************************************************************************************/ 00357 /*! 00358 * \fn DmRegister 00359 * 00360 * \brief Register a callback with DM for scan and advertising events. 00361 * 00362 * \param cback Client callback function. 00363 * 00364 * \return None. 00365 */ 00366 /*************************************************************************************************/ 00367 void DmRegister(dmCback_t cback); 00368 00369 /*************************************************************************************************/ 00370 /*! 00371 * \fn DmFindAdType 00372 * 00373 * \brief Find an advertising data element in the given advertising or scan response data. 00374 * 00375 * \param adType Advertising data element type to find. 00376 * \param dataLen Data length. 00377 * \param pData Pointer to advertising or scan response data. 00378 * 00379 * \return Pointer to the advertising data element byte array or NULL if not found. 00380 */ 00381 /*************************************************************************************************/ 00382 uint8_t *DmFindAdType(uint8_t adType, uint8_t dataLen, uint8_t *pData); 00383 00384 /*************************************************************************************************/ 00385 /*! 00386 * \fn DmAdvInit 00387 * 00388 * \brief Initialize DM advertising. 00389 * 00390 * \return None. 00391 */ 00392 /*************************************************************************************************/ 00393 void DmAdvInit(void); 00394 00395 /*************************************************************************************************/ 00396 /*! 00397 * \fn DmAdvStart 00398 * 00399 * \brief Start advertising using the given advertising type and duration. 00400 * 00401 * \param advType Advertising type. 00402 * \param duration The advertising duration, in milliseconds. 00403 * 00404 * \return None. 00405 */ 00406 /*************************************************************************************************/ 00407 void DmAdvStart(uint8_t advType, uint16_t duration); 00408 00409 /*************************************************************************************************/ 00410 /*! 00411 * \fn DmAdvStop 00412 * 00413 * \brief Stop advertising. 00414 * 00415 * \return None. 00416 */ 00417 /*************************************************************************************************/ 00418 void DmAdvStop(void); 00419 00420 /*************************************************************************************************/ 00421 /*! 00422 * \fn DmAdvSetInterval 00423 * 00424 * \brief Set the minimum and maximum advertising intervals. 00425 * 00426 * \param intervalMin Minimum advertising interval. 00427 * \param intervalMax Maximum advertising interval. 00428 * 00429 * \return None. 00430 */ 00431 /*************************************************************************************************/ 00432 void DmAdvSetInterval(uint16_t intervalMin, uint16_t intervalMax); 00433 00434 /*************************************************************************************************/ 00435 /*! 00436 * \fn DmAdvSetChannelMap 00437 * 00438 * \brief Include or exclude certain channels from the advertising channel map. 00439 * 00440 * \param channelMap Advertising channel map. 00441 * 00442 * \return None. 00443 */ 00444 /*************************************************************************************************/ 00445 void DmAdvSetChannelMap(uint8_t channelMap); 00446 00447 /*************************************************************************************************/ 00448 /*! 00449 * \fn DmAdvSetData 00450 * 00451 * \brief Set the advertising or scan response data to the given data. 00452 * 00453 * \param location Data location. 00454 * \param len Length of the data. Maximum length is 31 bytes. 00455 * \param pData Pointer to the data. 00456 * 00457 * \return None. 00458 */ 00459 /*************************************************************************************************/ 00460 void DmAdvSetData(uint8_t location, uint8_t len, uint8_t *pData); 00461 00462 /*************************************************************************************************/ 00463 /*! 00464 * \fn DmAdvSetAddrType 00465 * 00466 * \brief Set the local address type used while advertising. This function can be used to 00467 * configure advertising to use a random address. 00468 * 00469 * \param addrType Address type. 00470 * 00471 * \return None. 00472 */ 00473 /*************************************************************************************************/ 00474 void DmAdvSetAddrType(uint8_t addrType); 00475 00476 /*************************************************************************************************/ 00477 /*! 00478 * \fn DmAdvSetAdValue 00479 * 00480 * \brief Set the value of an advertising data element in the given advertising or 00481 * scan response data. If the element already exists in the data then it is replaced 00482 * with the new value. If the element does not exist in the data it is appended 00483 * to it, space permitting. 00484 * 00485 * \param adType Advertising data element type. 00486 * \param len Length of the value. Maximum length is 29 bytes. 00487 * \param pValue Pointer to the value. 00488 * \param pAdvDataLen Advertising or scan response data length. The new length is returned 00489 * in this parameter. 00490 * \param pAdvData Pointer to advertising or scan response data. 00491 * 00492 * \return TRUE if the element was successfully added to the data, FALSE otherwise. 00493 */ 00494 /*************************************************************************************************/ 00495 bool_t DmAdvSetAdValue(uint8_t adType, uint8_t len, uint8_t *pValue, uint8_t *pAdvDataLen, 00496 uint8_t *pAdvData); 00497 00498 /*************************************************************************************************/ 00499 /*! 00500 * \fn DmAdvSetName 00501 * 00502 * \brief Set the device name in the given advertising or scan response data. If the 00503 * name can only fit in the data if it is shortened, the name is shortened 00504 * and the AD type is changed to DM_ADV_TYPE_SHORT_NAME. 00505 * 00506 * \param len Length of the name. Maximum length is 29 bytes. 00507 * \param pValue Pointer to the name in UTF-8 format. 00508 * \param pAdvDataLen Advertising or scan response data length. The new length is returned 00509 * in this parameter. 00510 * \param pAdvData Pointer to advertising or scan response data. 00511 * 00512 * \return TRUE if the element was successfully added to the data, FALSE otherwise. 00513 */ 00514 /*************************************************************************************************/ 00515 bool_t DmAdvSetName(uint8_t len, uint8_t *pValue, uint8_t *pAdvDataLen, uint8_t *pAdvData); 00516 00517 /*************************************************************************************************/ 00518 /*! 00519 * \fn DmAdvPrivInit 00520 * 00521 * \brief Initialize private advertising. 00522 * 00523 * \return None. 00524 */ 00525 /*************************************************************************************************/ 00526 void DmAdvPrivInit(void); 00527 00528 /*************************************************************************************************/ 00529 /*! 00530 * \fn DmAdvPrivStart 00531 * 00532 * \brief Start using a private resolvable address. 00533 * 00534 * \param changeInterval Interval between automatic address changes, in seconds. 00535 * 00536 * \return None. 00537 */ 00538 /*************************************************************************************************/ 00539 void DmAdvPrivStart(uint16_t changeInterval); 00540 00541 /*************************************************************************************************/ 00542 /*! 00543 * \fn DmAdvPrivStop 00544 * 00545 * \brief Stop using a private resolvable address. 00546 * 00547 * \return None. 00548 */ 00549 /*************************************************************************************************/ 00550 void DmAdvPrivStop(void); 00551 00552 /*************************************************************************************************/ 00553 /*! 00554 * \fn DmScanInit 00555 * 00556 * \brief Initialize DM scanning. 00557 * 00558 * \return None. 00559 */ 00560 /*************************************************************************************************/ 00561 void DmScanInit(void); 00562 00563 /*************************************************************************************************/ 00564 /*! 00565 * \fn DmScanStart 00566 * 00567 * \brief Start scanning. 00568 * 00569 * \param mode Discoverability mode. 00570 * \param scanType Scan type. 00571 * \param filterDup Filter duplicates. Set to TRUE to filter duplicate responses received 00572 * from the same device. Set to FALSE to receive all responses. 00573 * \param duration The scan duration, in milliseconds. If set to zero, scanning will 00574 * continue until DmScanStop() is called. 00575 * 00576 * \return None. 00577 */ 00578 /*************************************************************************************************/ 00579 void DmScanStart(uint8_t mode, uint8_t scanType, bool_t filterDup, uint16_t duration); 00580 00581 /*************************************************************************************************/ 00582 /*! 00583 * \fn DmScanStop 00584 * 00585 * \brief Stop scanning. 00586 * 00587 * \return None. 00588 */ 00589 /*************************************************************************************************/ 00590 void DmScanStop(void); 00591 00592 /*************************************************************************************************/ 00593 /*! 00594 * \fn DmScanSetInterval 00595 * 00596 * \brief Set the scan interval and window. 00597 * 00598 * \param scanInterval The scan interval. 00599 * \param scanWindow The scan window. 00600 * 00601 * \return None. 00602 */ 00603 /*************************************************************************************************/ 00604 void DmScanSetInterval(uint16_t scanInterval, uint16_t scanWindow); 00605 00606 /*************************************************************************************************/ 00607 /*! 00608 * \fn DmScanSetAddrType 00609 * 00610 * \brief Set the local address type used while scanning. This function can be used to 00611 * configure scanning to use a random address. 00612 * 00613 * \param addrType Address type. 00614 * 00615 * \return None. 00616 */ 00617 /*************************************************************************************************/ 00618 void DmScanSetAddrType(uint8_t addrType); 00619 00620 /*************************************************************************************************/ 00621 /*! 00622 * \fn DmConnInit 00623 * 00624 * \brief Initialize DM connection manager. 00625 * 00626 * \return None. 00627 */ 00628 /*************************************************************************************************/ 00629 void DmConnInit(void); 00630 00631 /*************************************************************************************************/ 00632 /*! 00633 * \fn DmConnMasterInit 00634 * 00635 * \brief Initialize DM connection manager for operation as master. 00636 * 00637 * \return None. 00638 */ 00639 /*************************************************************************************************/ 00640 void DmConnMasterInit(void); 00641 00642 /*************************************************************************************************/ 00643 /*! 00644 * \fn DmConnSlaveInit 00645 * 00646 * \brief Initialize DM connection manager for operation as slave. 00647 * 00648 * \return None. 00649 */ 00650 /*************************************************************************************************/ 00651 void DmConnSlaveInit(void); 00652 00653 /*************************************************************************************************/ 00654 /*! 00655 * \fn DmConnRegister 00656 * 00657 * \brief Register with the DM connection manager. 00658 * 00659 * \param clientId The client identifier. 00660 * \param cback Client callback function. 00661 * 00662 * \return None. 00663 */ 00664 /*************************************************************************************************/ 00665 void DmConnRegister(uint8_t clientId, dmCback_t cback); 00666 00667 /*************************************************************************************************/ 00668 /*! 00669 * \fn DmConnOpen 00670 * 00671 * \brief Open a connection to a peer device with the given address. 00672 * 00673 * \param clientId The client identifier. 00674 * \param addrType Address type. 00675 * \param pAddr Peer device address. 00676 * 00677 * \return Connection identifier. 00678 */ 00679 /*************************************************************************************************/ 00680 dmConnId_t DmConnOpen(uint8_t clientId, uint8_t addrType, uint8_t *pAddr); 00681 00682 /*************************************************************************************************/ 00683 /*! 00684 * \fn DmConnClose 00685 * 00686 * \brief Close the connection with the give connection identifier. 00687 * 00688 * \param clientId The client identifier. 00689 * \param connId Connection identifier. 00690 * \param reason Reason connection is being closed. 00691 * 00692 * \return None. 00693 */ 00694 /*************************************************************************************************/ 00695 void DmConnClose(uint8_t clientId, dmConnId_t connId, uint8_t reason); 00696 00697 /*************************************************************************************************/ 00698 /*! 00699 * \fn DmConnAccept 00700 * 00701 * \brief Accept a connection from the given peer device by initiating directed advertising. 00702 * 00703 * \param clientId The client identifier. 00704 * \param addrType Address type. 00705 * \param pAddr Peer device address. 00706 * 00707 * \return Connection identifier. 00708 */ 00709 /*************************************************************************************************/ 00710 dmConnId_t DmConnAccept(uint8_t clientId, uint8_t addrType, uint8_t *pAddr); 00711 00712 /*************************************************************************************************/ 00713 /*! 00714 * \fn DmConnUpdate 00715 * 00716 * \brief Update the connection parameters of an open connection 00717 * 00718 * \param connId Connection identifier. 00719 * \param pConnSpec Connection specification. 00720 * 00721 * \return None. 00722 */ 00723 /*************************************************************************************************/ 00724 void DmConnUpdate(dmConnId_t connId, hciConnSpec_t *pConnSpec); 00725 00726 /*************************************************************************************************/ 00727 /*! 00728 * \fn DmConnSetScanInterval 00729 * 00730 * \brief Set the scan interval and window for created connections created with DmConnOpen(). 00731 * 00732 * \param scanInterval The scan interval. 00733 * \param scanWindow The scan window. 00734 * 00735 * \return None. 00736 */ 00737 /*************************************************************************************************/ 00738 void DmConnSetScanInterval(uint16_t scanInterval, uint16_t scanWindow); 00739 00740 /*************************************************************************************************/ 00741 /*! 00742 * \fn DmConnSetConnSpec 00743 * 00744 * \brief Set the connection specification parameters for connections created with DmConnOpen(). 00745 * 00746 * \param pConnSpec Connection spec parameters. 00747 * 00748 * \return None. 00749 */ 00750 /*************************************************************************************************/ 00751 void DmConnSetConnSpec(hciConnSpec_t *pConnSpec); 00752 00753 /*************************************************************************************************/ 00754 /*! 00755 * \fn DmConnSetAddrType 00756 * 00757 * \brief Set the local address type used for connections created with DmConnOpen(). 00758 * 00759 * \param addrType Address type. 00760 * 00761 * \return None. 00762 */ 00763 /*************************************************************************************************/ 00764 void DmConnSetAddrType(uint8_t addrType); 00765 00766 /*************************************************************************************************/ 00767 /*! 00768 * \fn DmConnSetIdle 00769 * 00770 * \brief Configure a bit in the connection idle state mask as busy or idle. 00771 * 00772 * \param connId Connection identifier. 00773 * \param idleMask Bit in the idle state mask to configure. 00774 * \param idle DM_CONN_BUSY or DM_CONN_IDLE. 00775 * 00776 * \return None. 00777 */ 00778 /*************************************************************************************************/ 00779 void DmConnSetIdle(dmConnId_t connId, uint16_t idleMask, uint8_t idle); 00780 00781 /*************************************************************************************************/ 00782 /*! 00783 * \fn DmConnCheckIdle 00784 * 00785 * \brief Check if a connection is idle. 00786 * 00787 * \param connId Connection identifier. 00788 * 00789 * \return Zero if connection is idle, nonzero if busy. 00790 */ 00791 /*************************************************************************************************/ 00792 uint16_t DmConnCheckIdle(dmConnId_t connId); 00793 00794 /*************************************************************************************************/ 00795 /*! 00796 * \fn DmDevReset 00797 * 00798 * \brief Reset the device. 00799 * 00800 * \return None. 00801 */ 00802 /*************************************************************************************************/ 00803 void DmDevReset(void); 00804 00805 /*************************************************************************************************/ 00806 /*! 00807 * \fn DmDevRole 00808 * 00809 * \brief Return the device role indicating master or slave. 00810 * 00811 * \return Device role. 00812 */ 00813 /*************************************************************************************************/ 00814 uint8_t DmDevRole(void); 00815 00816 /*************************************************************************************************/ 00817 /*! 00818 * \fn DmDevSetRandAddr 00819 * 00820 * \brief Set the random address to be used by the local device. 00821 * 00822 * \param pAddr Random address. 00823 * 00824 * \return None. 00825 */ 00826 /*************************************************************************************************/ 00827 void DmDevSetRandAddr(uint8_t *pAddr); 00828 00829 /*************************************************************************************************/ 00830 /*! 00831 * \fn DmDevWhiteListAdd 00832 * 00833 * \brief Add a peer device to the white list. Note that this function cannot be called 00834 * while advertising, scanning, or connecting with white list filtering active. 00835 * 00836 * \param addrType Address type. 00837 * \param pAddr Peer device address. 00838 * 00839 * \return None. 00840 */ 00841 /*************************************************************************************************/ 00842 void DmDevWhiteListAdd(uint8_t addrType, uint8_t *pAddr); 00843 00844 /*************************************************************************************************/ 00845 /*! 00846 * \fn DmDevWhiteListRemove 00847 * 00848 * \brief Remove a peer device from the white list. Note that this function cannot be called 00849 * while advertising, scanning, or connecting with white list filtering active. 00850 * 00851 * \param addrType Address type. 00852 * \param pAddr Peer device address. 00853 * 00854 * \return None. 00855 */ 00856 /*************************************************************************************************/ 00857 void DmDevWhiteListRemove(uint8_t addrType, uint8_t *pAddr); 00858 00859 /*************************************************************************************************/ 00860 /*! 00861 * \fn DmDevWhiteListClear 00862 * 00863 * \brief Clear the white list. Note that this function cannot be called while 00864 * advertising, scanning, or connecting with white list filtering active. 00865 * 00866 * \return None. 00867 */ 00868 /*************************************************************************************************/ 00869 void DmDevWhiteListClear(void); 00870 00871 /*************************************************************************************************/ 00872 /*! 00873 * \fn DmDevVsInit 00874 * 00875 * \brief Vendor-specific controller initialization function. 00876 * 00877 * \param param Vendor-specific parameter. 00878 * 00879 * \return None. 00880 */ 00881 /*************************************************************************************************/ 00882 void DmDevVsInit(uint8_t param); 00883 00884 /*************************************************************************************************/ 00885 /*! 00886 * \fn DmSecInit 00887 * 00888 * \brief Initialize DM security. 00889 * 00890 * \return None. 00891 */ 00892 /*************************************************************************************************/ 00893 void DmSecInit(void); 00894 00895 /*************************************************************************************************/ 00896 /*! 00897 * \fn DmSecPairReq 00898 * 00899 * \brief This function is called by a master device to initiate pairing. 00900 * 00901 * \param connId DM connection ID. 00902 * \param oob Out-of-band pairing data present or not present. 00903 * \param auth Authentication and bonding flags. 00904 * \param iKeyDist Initiator key distribution flags. 00905 * \param rKeyDist Responder key distribution flags. 00906 * 00907 * \return None. 00908 */ 00909 /*************************************************************************************************/ 00910 void DmSecPairReq(dmConnId_t connId, bool_t oob, uint8_t auth, uint8_t iKeyDist, uint8_t rKeyDist); 00911 00912 /*************************************************************************************************/ 00913 /*! 00914 * \fn DmSecPairRsp 00915 * 00916 * \brief This function is called by a slave device to proceed with pairing after a 00917 * DM_SEC_PAIR_IND event is received. 00918 * 00919 * \param connId DM connection ID. 00920 * \param oob Out-of-band pairing data present or not present. 00921 * \param auth Authentication and bonding flags. 00922 * \param iKeyDist Initiator key distribution flags. 00923 * \param rKeyDist Responder key distribution flags. 00924 * 00925 * \return None. 00926 */ 00927 /*************************************************************************************************/ 00928 void DmSecPairRsp(dmConnId_t connId, bool_t oob, uint8_t auth, uint8_t iKeyDist, uint8_t rKeyDist); 00929 00930 /*************************************************************************************************/ 00931 /*! 00932 * \fn DmSecCancelReq 00933 * 00934 * \brief This function is called to cancel the pairing process. 00935 * 00936 * \param connId DM connection ID. 00937 * \param reason Failure reason. 00938 * 00939 * \return None. 00940 */ 00941 /*************************************************************************************************/ 00942 void DmSecCancelReq(dmConnId_t connId, uint8_t reason); 00943 00944 /*************************************************************************************************/ 00945 /*! 00946 * \fn DmSecAuthRsp 00947 * 00948 * \brief This function is called in response to a DM_SEC_AUTH_REQ_IND event to provide 00949 * PIN or OOB data during pairing. 00950 * 00951 * \param connId DM connection ID. 00952 * \param authDataLen Length of PIN or OOB data. 00953 * \param pAuthData pointer to PIN or OOB data. 00954 * 00955 * \return None. 00956 */ 00957 /*************************************************************************************************/ 00958 void DmSecAuthRsp(dmConnId_t connId, uint8_t authDataLen, uint8_t *pAuthData); 00959 00960 /*************************************************************************************************/ 00961 /*! 00962 * \fn DmSecSlaveReq 00963 * 00964 * \brief This function is called by a slave device to request that the master initiates 00965 * pairing or link encryption. 00966 * 00967 * \param connId DM connection ID. 00968 * \param auth Authentication flags. 00969 * 00970 * \return None. 00971 */ 00972 /*************************************************************************************************/ 00973 void DmSecSlaveReq(dmConnId_t connId, uint8_t auth); 00974 00975 /*************************************************************************************************/ 00976 /*! 00977 * \fn DmSecEncryptReq 00978 * 00979 * \brief This function is called by a master device to initiate link encryption. 00980 * 00981 * \param connId DM connection ID. 00982 * \param secLevel Security level of pairing when LTK was exchanged. 00983 * \param pLtk Pointer to LTK parameter structure. 00984 * 00985 * \return None. 00986 */ 00987 /*************************************************************************************************/ 00988 void DmSecEncryptReq(dmConnId_t connId, uint8_t secLevel, dmSecLtk_t *pLtk); 00989 00990 /*************************************************************************************************/ 00991 /*! 00992 * \fn DmSecLtkRsp 00993 * 00994 * \brief This function is called by a slave in response to a DM_SEC_LTK_REQ_IND event 00995 * to provide the long term key used for encryption. 00996 * 00997 * \param connId DM connection ID. 00998 * \param keyFound TRUE if key found. 00999 * \param secLevel Security level of pairing when key was exchanged. 01000 * \param pKey Pointer to the key, if found. 01001 * 01002 * \return None. 01003 */ 01004 /*************************************************************************************************/ 01005 void DmSecLtkRsp(dmConnId_t connId, bool_t keyFound, uint8_t secLevel, uint8_t *pKey); 01006 01007 /*************************************************************************************************/ 01008 /*! 01009 * \fn DmSecSetLocalCsrk 01010 * 01011 * \brief This function sets the local CSRK used by the device. 01012 * 01013 * \param pCsrk Pointer to CSRK. 01014 * 01015 * \return None. 01016 */ 01017 /*************************************************************************************************/ 01018 void DmSecSetLocalCsrk(uint8_t *pCsrk); 01019 01020 /*************************************************************************************************/ 01021 /*! 01022 * \fn DmSecSetLocalIrk 01023 * 01024 * \brief This function sets the local IRK used by the device. 01025 * 01026 * \param pCsrk Pointer to IRK. 01027 * 01028 * \return None. 01029 */ 01030 /*************************************************************************************************/ 01031 void DmSecSetLocalIrk(uint8_t *pIrk); 01032 01033 /*************************************************************************************************/ 01034 /*! 01035 * \fn DmPrivInit 01036 * 01037 * \brief Initialize DM privacy module. 01038 * 01039 * \return None. 01040 */ 01041 /*************************************************************************************************/ 01042 void DmPrivInit(void); 01043 01044 /*************************************************************************************************/ 01045 /*! 01046 * \fn DmPrivResolveAddr 01047 * 01048 * \brief Resolve a private resolvable address. When complete the client's callback function 01049 * is called with a DM_PRIV_RESOLVED_ADDR_IND event. The client must wait to receive 01050 * this event before executing this function again. 01051 * 01052 * \param pAddr Peer device address. 01053 * \param pIrk The peer's identity resolving key. 01054 * \param param Client-defined parameter returned with callback event. 01055 * 01056 * \return None. 01057 */ 01058 /*************************************************************************************************/ 01059 void DmPrivResolveAddr(uint8_t *pAddr, uint8_t *pIrk, uint16_t param); 01060 01061 /*************************************************************************************************/ 01062 /*! 01063 * \fn DmL2cConnUpdateCnf 01064 * 01065 * \brief For internal use only. L2C calls this function to send the result of an L2CAP 01066 * connection update response to DM. 01067 * 01068 * \param handle Connection handle. 01069 * \param reason Connection update response reason code. 01070 * \return None. 01071 */ 01072 /*************************************************************************************************/ 01073 void DmL2cConnUpdateCnf(uint16_t handle, uint16_t reason); 01074 01075 /*************************************************************************************************/ 01076 /*! 01077 * \fn DmL2cConnUpdateInd 01078 * 01079 * \brief For internal use only. L2C calls this function when it receives a connection update 01080 * request from a peer device. 01081 * 01082 * \param identifier Identifier value. 01083 * \param handle Connection handle. 01084 * \param pConnSpec Connection spec parameters. 01085 * \return None. 01086 */ 01087 /*************************************************************************************************/ 01088 void DmL2cConnUpdateInd(uint8_t identifier, uint16_t handle, hciConnSpec_t *pConnSpec); 01089 01090 /*************************************************************************************************/ 01091 /*! 01092 * \fn DmConnIdByHandle 01093 * 01094 * \brief For internal use only. Find the connection ID with matching handle. 01095 * 01096 * \param handle Handle to find. 01097 * 01098 * \return Connection ID or DM_CONN_ID_NONE if error. 01099 */ 01100 /*************************************************************************************************/ 01101 dmConnId_t DmConnIdByHandle(uint16_t handle); 01102 01103 /*************************************************************************************************/ 01104 /*! 01105 * \fn DmConnInUse 01106 * 01107 * \brief For internal use only. Return TRUE if the connection is in use. 01108 * 01109 * \param connId Connection ID. 01110 * 01111 * \return TRUE if the connection is in use, FALSE otherwise. 01112 */ 01113 /*************************************************************************************************/ 01114 bool_t DmConnInUse(dmConnId_t connId); 01115 01116 /*************************************************************************************************/ 01117 /*! 01118 * \fn DmConnPeerAddrType 01119 * 01120 * \brief For internal use only. Return the peer address type. 01121 * 01122 * \param connId Connection ID. 01123 * 01124 * \return Peer address type. 01125 */ 01126 /*************************************************************************************************/ 01127 uint8_t DmConnPeerAddrType(dmConnId_t connId); 01128 01129 /*************************************************************************************************/ 01130 /*! 01131 * \fn DmConnPeerAddr 01132 * 01133 * \brief For internal use only. Return the peer device address. 01134 * 01135 * \param connId Connection ID. 01136 * 01137 * \return Pointer to peer device address. 01138 */ 01139 /*************************************************************************************************/ 01140 uint8_t *DmConnPeerAddr(dmConnId_t connId); 01141 01142 /*************************************************************************************************/ 01143 /*! 01144 * \fn DmConnLocalAddrType 01145 * 01146 * \brief For internal use only. Return the local address type. 01147 * 01148 * \param connId Connection ID. 01149 * 01150 * \return Local address type. 01151 */ 01152 /*************************************************************************************************/ 01153 uint8_t DmConnLocalAddrType(dmConnId_t connId); 01154 01155 /*************************************************************************************************/ 01156 /*! 01157 * \fn DmConnLocalAddr 01158 * 01159 * \brief For internal use only. Return the local address. 01160 * 01161 * \param connId Connection ID. 01162 * 01163 * \return Pointer to local address. 01164 */ 01165 /*************************************************************************************************/ 01166 uint8_t *DmConnLocalAddr(dmConnId_t connId); 01167 01168 /*************************************************************************************************/ 01169 /*! 01170 * \fn DmConnSecLevel 01171 * 01172 * \brief For internal use only. Return the security level of the connection. 01173 * 01174 * \param connId Connection ID. 01175 * 01176 * \return Security level of the connection. 01177 */ 01178 /*************************************************************************************************/ 01179 uint8_t DmConnSecLevel(dmConnId_t connId); 01180 01181 /*************************************************************************************************/ 01182 /*! 01183 * \fn DmSmpEncryptReq 01184 * 01185 * \brief For internal use only. This function is called by SMP to request encryption. 01186 * 01187 * \param connId DM connection ID. 01188 * \param secLevel Security level of pairing when key was exchanged. 01189 * \param pKey Pointer to key. 01190 * 01191 * \return None. 01192 */ 01193 /*************************************************************************************************/ 01194 void DmSmpEncryptReq(dmConnId_t connId, uint8_t secLevel, uint8_t *pKey); 01195 01196 /*************************************************************************************************/ 01197 /*! 01198 * \fn DmSmpCbackExec 01199 * 01200 * \brief For internal use only. Execute DM callback from SMP procedures. 01201 * 01202 * \param pDmEvt Pointer to callback event data. 01203 * 01204 * \return None. 01205 */ 01206 /*************************************************************************************************/ 01207 void DmSmpCbackExec(dmEvt_t *pDmEvt); 01208 01209 /*************************************************************************************************/ 01210 /*! 01211 * \fn DmSecGetLocalCsrk 01212 * 01213 * \brief For internal use only. This function gets the local CSRK used by the device. 01214 * 01215 * \return Pointer to CSRK. 01216 */ 01217 /*************************************************************************************************/ 01218 uint8_t *DmSecGetLocalCsrk(void); 01219 01220 /*************************************************************************************************/ 01221 /*! 01222 * \fn DmSecGetLocalIrk 01223 * 01224 * \brief For internal use only. This function gets the local IRK used by the device. 01225 * 01226 * \return Pointer to IRK. 01227 */ 01228 /*************************************************************************************************/ 01229 uint8_t *DmSecGetLocalIrk(void); 01230 01231 #ifdef __cplusplus 01232 }; 01233 #endif 01234 01235 #endif /* DM_API_H */
Generated on Tue Jul 12 2022 19:59:22 by
1.7.2