![]() |
Cordio Stack and Cordio Profiles
r2p3-02rel0
|
Device Manager subsystem API. More...
Go to the source code of this file.
Macros | |
#define | DM_SEC_HCI_ERR_BASE 0x20 |
Base value for HCI error status values for DM_SEC_PAIR_CMPL_IND. | |
GAP Device Role | |
Connectable GAP Roles. | |
#define | DM_ROLE_MASTER HCI_ROLE_MASTER |
Role is master. | |
#define | DM_ROLE_SLAVE HCI_ROLE_SLAVE |
Role is slave. | |
GAP Discovery Mode | |
When setup as a discoverable device, these are the possible modes of discovery. | |
#define | DM_DISC_MODE_NONE 0 |
GAP non-discoverable. | |
#define | DM_DISC_MODE_LIMITED 1 |
GAP limited discoverable mode. | |
#define | DM_DISC_MODE_GENERAL 2 |
GAP general discoverable mode. | |
GAP Advertising Type | |
Type of connectable or disconverable advertising to perform. | |
#define | DM_ADV_CONN_UNDIRECT 0 |
Connectable and scannable undirected advertising. | |
#define | DM_ADV_CONN_DIRECT 1 |
Connectable directed advertising. | |
#define | DM_ADV_SCAN_UNDIRECT 2 |
Scannable undirected advertising. | |
#define | DM_ADV_NONCONN_UNDIRECT 3 |
Non-connectable and non-scannable undirected advertising. | |
#define | DM_ADV_CONN_DIRECT_LO_DUTY 4 |
Connectable directed low duty cycle advertising. | |
GAP AE Advertising Types | |
Advertising extension types - AE only. | |
#define | DM_EXT_ADV_CONN_UNDIRECT 5 |
Connectable undirected advertising. | |
#define | DM_EXT_ADV_NONCONN_DIRECT 6 |
Non-connectable and non-scannable directed advertising. | |
#define | DM_EXT_ADV_SCAN_DIRECT 7 |
Scannable directed advertising. | |
#define | DM_ADV_NONE 255 |
For internal use only. | |
GAP Advertising Report Type | |
Type of an advertising report observed while scanning. | |
#define | DM_RPT_CONN_UNDIRECT 0 |
Connectable and scannable undirected advertising. | |
#define | DM_RPT_CONN_DIRECT 1 |
Connectable directed advertising. | |
#define | DM_RPT_SCAN_UNDIRECT 2 |
Scannable undirected advertising. | |
#define | DM_RPT_NONCONN_UNDIRECT 3 |
Non-connectable undirected advertising. | |
#define | DM_RPT_SCAN_RESPONSE 4 |
Scan response. | |
GAP Advertising Data Location | |
Whether data is located in the advertising data or in the scan response data | |
#define | DM_DATA_LOC_ADV 0 |
Locate data in the advertising data. | |
#define | DM_DATA_LOC_SCAN 1 |
Locate data in the scan response data. | |
GAP Scan Type | |
When setup as a connectable or observer device, this is the type of scanning to perform. | |
#define | DM_SCAN_TYPE_PASSIVE 0 |
Passive scan. | |
#define | DM_SCAN_TYPE_ACTIVE 1 |
Active scan. | |
GAP Advertising Channel Map | |
Advertising channel map codes | |
#define | DM_ADV_CHAN_37 HCI_ADV_CHAN_37 |
Advertising channel 37. | |
#define | DM_ADV_CHAN_38 HCI_ADV_CHAN_38 |
Advertising channel 38. | |
#define | DM_ADV_CHAN_39 HCI_ADV_CHAN_39 |
Advertising channel 39. | |
#define | DM_ADV_CHAN_ALL (HCI_ADV_CHAN_37 | HCI_ADV_CHAN_38 | HCI_ADV_CHAN_39) |
All advertising channels. | |
DM Client IDs | |
The client ID parameter to function DmConnRegister() | |
#define | DM_CLIENT_ID_ATT 0 |
Identifier for attribute protocol, for internal use only. | |
#define | DM_CLIENT_ID_SMP 1 |
Identifier for security manager protocol, for internal use only. | |
#define | DM_CLIENT_ID_DM 2 |
Identifier for device manager, for internal use only. | |
#define | DM_CLIENT_ID_APP 3 |
Identifier for the application. | |
#define | DM_CLIENT_ID_L2C 4 |
Identifier for L2CAP. | |
#define | DM_CLIENT_ID_MAX 5 |
For internal use only. | |
DM Unknown IDs | |
Values for unknown or unspecificed device identifiers. | |
#define | DM_CONN_ID_NONE 0 |
Unknown connection ID or other error. | |
#define | DM_SYNC_ID_NONE 0 |
Unknown sync ID or other error. | |
GAP Address Type | |
The address type to use over the air or that is associated with a received address. | |
#define | DM_ADDR_PUBLIC 0x00 |
Public device address. | |
#define | DM_ADDR_RANDOM 0x01 |
Random device address. | |
#define | DM_ADDR_PUBLIC_IDENTITY 0x02 |
Public identity address (corresponds to resolved private address) | |
#define | DM_ADDR_RANDOM_IDENTITY 0x03 |
Random (static) identity address (corresponds to resolved private address) | |
#define | DM_ADDR_RANDOM_UNRESOLVED 0xFE |
Random device address (Controller unable to resolve) | |
#define | DM_ADDR_NONE 0xFF |
No address provided (anonymous) | |
GAP Advertising Data Types | |
Advertising data types flags. | |
#define | DM_ADV_TYPE_FLAGS 0x01 |
Flag bits. | |
#define | DM_ADV_TYPE_16_UUID_PART 0x02 |
Partial list of 16 bit UUIDs. | |
#define | DM_ADV_TYPE_16_UUID 0x03 |
Complete list of 16 bit UUIDs. | |
#define | DM_ADV_TYPE_32_UUID_PART 0x04 |
Partial list of 32 bit UUIDs. | |
#define | DM_ADV_TYPE_32_UUID 0x05 |
Complete list of 32 bit UUIDs. | |
#define | DM_ADV_TYPE_128_UUID_PART 0x06 |
Partial list of 128 bit UUIDs. | |
#define | DM_ADV_TYPE_128_UUID 0x07 |
Complete list of 128 bit UUIDs. | |
#define | DM_ADV_TYPE_SHORT_NAME 0x08 |
Shortened local name. | |
#define | DM_ADV_TYPE_LOCAL_NAME 0x09 |
Complete local name. | |
#define | DM_ADV_TYPE_TX_POWER 0x0A |
TX power level. | |
#define | DM_ADV_TYPE_SM_TK_VALUE 0x10 |
Security manager TK value. | |
#define | DM_ADV_TYPE_SM_OOB_FLAGS 0x11 |
Security manager OOB flags. | |
#define | DM_ADV_TYPE_CONN_INTERVAL 0x12 |
Slave preferred connection interval. | |
#define | DM_ADV_TYPE_SIGNED_DATA 0x13 |
Signed data. | |
#define | DM_ADV_TYPE_16_SOLICIT 0x14 |
Service soliticiation list of 16 bit UUIDs. | |
#define | DM_ADV_TYPE_128_SOLICIT 0x15 |
Service soliticiation list of 128 bit UUIDs. | |
#define | DM_ADV_TYPE_SERVICE_DATA 0x16 |
Service data - 16-bit UUID. | |
#define | DM_ADV_TYPE_PUBLIC_TARGET 0x17 |
Public target address. | |
#define | DM_ADV_TYPE_RANDOM_TARGET 0x18 |
Random target address. | |
#define | DM_ADV_TYPE_APPEARANCE 0x19 |
Device appearance. | |
#define | DM_ADV_TYPE_ADV_INTERVAL 0x1A |
Advertising interval. | |
#define | DM_ADV_TYPE_BD_ADDR 0x1B |
LE Bluetooth device address. | |
#define | DM_ADV_TYPE_ROLE 0x1C |
LE role. | |
#define | DM_ADV_TYPE_32_SOLICIT 0x1F |
Service soliticiation list of 32 bit UUIDs. | |
#define | DM_ADV_TYPE_SVC_DATA_32 0x20 |
Service data - 32-bit UUID. | |
#define | DM_ADV_TYPE_SVC_DATA_128 0x21 |
Service data - 128-bit UUID. | |
#define | DM_ADV_TYPE_LESC_CONFIRM 0x22 |
LE Secure Connections confirm value. | |
#define | DM_ADV_TYPE_LESC_RANDOM 0x23 |
LE Secure Connections random value. | |
#define | DM_ADV_TYPE_URI 0x24 |
URI. | |
#define | DM_ADV_TYPE_MANUFACTURER 0xFF |
Manufacturer specific data. | |
GAP Advertising Data Flag Advertising Type | |
Bit mask for Advertising Type flag in advertising data. | |
#define | DM_FLAG_LE_LIMITED_DISC 0x01 |
Limited discoverable flag. | |
#define | DM_FLAG_LE_GENERAL_DISC 0x02 |
General discoverable flag. | |
#define | DM_FLAG_LE_BREDR_NOT_SUP 0x04 |
BR/EDR not supported flag. | |
GAP Advertising Data Element Indexes | |
Advertising data element indexes. | |
#define | DM_AD_LEN_IDX 0 |
Advertising data element len. | |
#define | DM_AD_TYPE_IDX 1 |
Advertising data element type. | |
#define | DM_AD_DATA_IDX 2 |
Advertising data element data. | |
GAP Advertising URI | |
Advertising URI Scheme | |
#define | DM_URI_SCHEME_HTTP 0x16 |
URI HTTP Scheme. | |
#define | DM_URI_SCHEME_HTTPS 0x17 |
URI HTTPS Scheme. | |
GAP Timeouts | |
Timeouts defined by the GAP specification; in units of milliseconds. | |
#define | DM_GAP_LIM_ADV_TIMEOUT 180000 |
Maximum advertising duration in limited discoverable mode. | |
#define | DM_GAP_GEN_DISC_SCAN_MIN 10240 |
Minimum scan duration for general discovery. | |
#define | DM_GAP_LIM_DISC_SCAN_MIN 10240 |
Minimum scan duration for limited discovery. | |
#define | DM_GAP_CONN_PARAM_TIMEOUT 30000 |
Connection parameter update timeout. | |
#define | DM_GAP_SCAN_FAST_PERIOD 30720 |
Minimum time to perform scanning when user initiated. | |
#define | DM_GAP_ADV_FAST_PERIOD 30000 |
Minimum time to perform advertising when user initiated. | |
GAP 1M PHY Timing | |
Advertising, scanning, and connection parameters defined in the GAP specification for the LE 1M PHY. In units of 625 microseconds. | |
#define | DM_GAP_SCAN_FAST_INT_MIN 48 |
Minimum scan interval when user initiated. | |
#define | DM_GAP_SCAN_FAST_INT_MAX 96 |
Maximum scan interval when user initiated. | |
#define | DM_GAP_SCAN_FAST_WINDOW 48 |
Scan window when user initiated. | |
#define | DM_GAP_SCAN_SLOW_INT_1 2048 |
Scan interval 1 when background scannning. | |
#define | DM_GAP_SCAN_SLOW_WINDOW_1 18 |
Scan window 1 when background scanning. | |
#define | DM_GAP_SCAN_SLOW_INT_2 4096 |
Scan interval 2 when background scannning. | |
#define | DM_GAP_SCAN_SLOW_WINDOW_2 36 |
Scan window 2 when background scanning. | |
#define | DM_GAP_ADV_FAST_INT_MIN_1 48 |
Minimum advertising interval 1 when user initiated. | |
#define | DM_GAP_ADV_FAST_INT_MAX_1 96 |
Maximum advertising interval 1 when user initiated. | |
#define | DM_GAP_ADV_FAST_INT_MIN_2 160 |
Minimum advertising interval 2 when user initiated. | |
#define | DM_GAP_ADV_FAST_INT_MAX_2 240 |
Maximum advertising interval 2 when user initiated. | |
#define | DM_GAP_ADV_SLOW_INT_MIN 1600 |
Minimum advertising interval when background advertising. | |
#define | DM_GAP_ADV_SLOW_INT_MAX 1920 |
Maximum advertising interval when background advertising. | |
GAP Coded PHY Timing | |
Advertising, scanning, and connection parameters defined in the GAP specification for the LE Coded PHY. In units of 625 microseconds. | |
#define | DM_GAP_SCAN_CODED_FAST_INT_MIN 144 |
Minimum scan interval when user initiated on LE Coded PHY. | |
#define | DM_GAP_SCAN_CODED_FAST_INT_MAX 288 |
Maximum scan interval when user initiated on LE Coded PHY. | |
#define | DM_GAP_SCAN_CODED_FAST_WINDOW 144 |
Scan window when user initiated on LE Coded PHY. | |
#define | DM_GAP_SCAN_CODED_SLOW_INT_1 6144 |
Scan interval 1 when background scannning on LE Coded PHY. | |
#define | DM_GAP_SCAN_CODED_SLOW_WINDOW_1 54 |
Scan window 1 when background scanning on LE Coded PHY. | |
#define | DM_GAP_SCAN_CODED_SLOW_INT_2 12288 |
Scan interval 2 when background scannning on LE Coded PHY. | |
#define | DM_GAP_SCAN_CODED_SLOW_WINDOW_2 108 |
Scan window 2 when background scanning on LE Coded PHY. | |
#define | DM_GAP_ADV_CODED_FAST_INT_MIN_1 144 |
Minimum advertising interval 1 when user initiated on LE Coded PHY. | |
#define | DM_GAP_ADV_CODED_FAST_INT_MAX_1 288 |
Maximum advertising interval 1 when user initiated on LE Coded PHY. | |
#define | DM_GAP_ADV_CODED_FAST_INT_MIN_2 480 |
Minimum advertising interval 2 when user initiated on LE Coded PHY. | |
#define | DM_GAP_ADV_CODED_FAST_INT_MAX_2 720 |
Maximum advertising interval 2 when user initiated on LE Coded PHY. | |
#define | DM_GAP_ADV_CODED_SLOW_INT_MIN 4800 |
Minimum advertising interval when background advertising on LE Coded PHY. | |
#define | DM_GAP_ADV_CODED_SLOW_INT_MAX 5760 |
Maximum advertising interval when background advertising on LE Coded PHY. | |
GAP Connection Slave Latency | |
#define | DM_GAP_CONN_EST_LATENCY 0 |
GAP connection establishment slaves latency. | |
GAP Connection Interval | |
GAP connection interval in 1.25ms units. | |
#define | DM_GAP_INITIAL_CONN_INT_MIN 24 |
Minimum initial connection interval. | |
#define | DM_GAP_INITIAL_CONN_INT_MAX 40 |
Maximum initial connection interval. | |
GAP Connection Event Lengths | |
GAP connection establishment minimum and maximum connection event lengths. | |
#define | DM_GAP_CONN_EST_MIN_CE_LEN 0 |
Connection establishment minimum event length. | |
#define | DM_GAP_CONN_EST_MAX_CE_LEN 0 |
Connection establishment maximum event length. | |
GAP Peripheral Privacy Characteristic Values | |
#define | DM_GAP_PRIV_DISABLED 0 |
Privacy Disabled. | |
#define | DM_GAP_PRIV_ENABLED 1 |
Privacy Enabled. | |
GAP Connection Supervision Timeout | |
Connection supervision timeout, in 10ms units | |
#define | DM_DEFAULT_EST_SUP_TIMEOUT 2000 |
Connection establishment supervision timeout default, in 10ms units. | |
GAP Security Pairing Authentication Requirements | |
Pairing authentication/security properties bit mask. | |
#define | DM_AUTH_BOND_FLAG SMP_AUTH_BOND_FLAG |
Bonding requested. | |
#define | DM_AUTH_MITM_FLAG SMP_AUTH_MITM_FLAG |
MITM (authenticated pairing) requested. | |
#define | DM_AUTH_SC_FLAG SMP_AUTH_SC_FLAG |
LE Secure Connections requested. | |
#define | DM_AUTH_KP_FLAG SMP_AUTH_KP_FLAG |
Keypress notifications requested. | |
GAP Key Distribution Flags | |
Key distribution bit mask | |
#define | DM_KEY_DIST_LTK SMP_KEY_DIST_ENC |
Distribute LTK used for encryption. | |
#define | DM_KEY_DIST_IRK SMP_KEY_DIST_ID |
Distribute IRK used for privacy. | |
#define | DM_KEY_DIST_CSRK SMP_KEY_DIST_SIGN |
Distribute CSRK used for signed data. | |
DM Security Key Indication Types | |
Type of key used in DM_SEC_KEY_IND. | |
#define | DM_KEY_LOCAL_LTK 0x01 |
LTK generated locally for this device. | |
#define | DM_KEY_PEER_LTK 0x02 |
LTK received from peer device. | |
#define | DM_KEY_IRK 0x04 |
IRK and identity info of peer device. | |
#define | DM_KEY_CSRK 0x08 |
CSRK of peer device. | |
GAP Security Level | |
GAP Mode 1 Security Levels | |
#define | DM_SEC_LEVEL_NONE 0 |
Connection has no security. | |
#define | DM_SEC_LEVEL_ENC 1 |
Connection is encrypted with unauthenticated key. | |
#define | DM_SEC_LEVEL_ENC_AUTH 2 |
Connection is encrypted with authenticated key. | |
#define | DM_SEC_LEVEL_ENC_LESC 3 |
Connection is encrypted with LE Secure Connections. | |
GAP Random Address Types | |
Random address type masks. | |
#define | DM_RAND_ADDR_STATIC 0xC0 |
Static address. | |
#define | DM_RAND_ADDR_RESOLV 0x40 |
Resolvable private address. | |
#define | DM_RAND_ADDR_NONRESOLV 0x00 |
Non-resolvable private address. | |
GAP Random Address Macros | |
Macros for identifying address type. | |
#define | DM_RAND_ADDR_GET(addr) ((addr)[5] & 0xC0) |
Get the type of random address. | |
#define | DM_RAND_ADDR_SET(addr, type) {(addr)[5] = ((addr)[5] & 0x3F) | (type);} |
Set the type of random address. | |
#define | DM_RAND_ADDR_RPA(addr, type) |
Check for Resolvable Random Address. More... | |
GAP Privacy Mode | |
Privacy Mode of this device in regards to a peer device. | |
#define | DM_PRIV_MODE_NETWORK 0x00 |
Network privacy mode (default). | |
#define | DM_PRIV_MODE_DEVICE 0x01 |
Device privacy mode. | |
DM Internal State | |
Connection busy or idle state | |
#define | DM_CONN_IDLE 0 |
Connection is idle. | |
#define | DM_CONN_BUSY 1 |
Connection is busy. | |
DM Internal State Flags | |
Connection busy/idle state bitmask. | |
#define | DM_IDLE_SMP_PAIR 0x0001 |
SMP pairing in progress. | |
#define | DM_IDLE_DM_ENC 0x0002 |
DM Encryption setup in progress. | |
#define | DM_IDLE_ATTS_DISC 0x0004 |
ATTS service discovery in progress. | |
#define | DM_IDLE_APP_DISC 0x0008 |
App framework service discovery in progress. | |
#define | DM_IDLE_USER_1 0x0010 |
For use by user application. | |
#define | DM_IDLE_USER_2 0x0020 |
For use by user application. | |
#define | DM_IDLE_USER_3 0x0040 |
For use by user application. | |
#define | DM_IDLE_USER_4 0x0080 |
For use by user application. | |
GAP Filter Policy Modes | |
Filter policy modes. | |
#define | DM_FILT_POLICY_MODE_ADV 0 |
Advertising filter policy mode. | |
#define | DM_FILT_POLICY_MODE_SCAN 1 |
Scanning filter policy mode. | |
#define | DM_FILT_POLICY_MODE_INIT 2 |
Initiator filter policy mode. | |
#define | DM_FILT_POLICY_MODE_SYNC 3 |
Synchronization filter policy mode. | |
DM Proprietary Error Codes | |
Internal error codes not sent in any PDU. | |
#define | DM_ERR_SMP_RX_PDU_LEN_EXCEEDED 0x01 |
LESC key length exceeded maximum RX PDU length. | |
#define | DM_ERR_ATT_RX_PDU_LEN_EXCEEDED 0x02 |
Configured ATT MTU exceeded maximum RX PDU length. | |
#define | DM_ERR_L2C_RX_PDU_LEN_EXCEEDED 0x03 |
Registered COC MPS exceeded maximum RX PDU length. | |
DM Legacy Advertising Handle | |
Default handle for legacy advertising when using legacy HCI interface. In this case only one advertising set is allowed so all activity uses the same handle. | |
#define | DM_ADV_HANDLE_DEFAULT 0 |
Default Advertising handle for legacy advertising. | |
Typedefs | |
typedef uint8_t | dmConnId_t |
Connection identifier. | |
typedef uint8_t | dmSyncId_t |
Synchronization identifier. | |
typedef void(* | dmCback_t) (dmEvt_t *pDmEvt) |
Callback type. | |
Functions | |
DM App Callback Registration | |
void | DmRegister (dmCback_t cback) |
Register a callback with DM for scan and advertising events. More... | |
DM Advertising Functions | |
Functions used to control Legacy and Extended Advertising. | |
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. More... | |
void | DmAdvInit (void) |
Initialize DM legacy advertising. More... | |
void | DmExtAdvInit (void) |
Initialize DM extended advertising. More... | |
bool_t | DmAdvModeLeg (void) |
Whether DM advertising is in legacy mode. More... | |
bool_t | DmAdvModeExt (void) |
Whether DM advertising is in extended mode. More... | |
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. More... | |
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. More... | |
void | DmAdvStart (uint8_t numSets, uint8_t *pAdvHandles, uint16_t *pDuration, uint8_t *pMaxEaEvents) |
Start advertising using the given advertising set and duration. More... | |
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 advertising sets are disabled. More... | |
void | DmAdvRemoveAdvSet (uint8_t advHandle) |
Remove an advertising set. More... | |
void | DmAdvClearAdvSets (void) |
Clear advertising sets. More... | |
void | DmAdvSetInterval (uint8_t advHandle, uint16_t intervalMin, uint16_t intervalMax) |
Set the minimum and maximum advertising intervals. More... | |
void | DmAdvSetChannelMap (uint8_t advHandle, uint8_t channelMap) |
Include or exclude certain channels from the advertising channel map. More... | |
void | DmAdvSetAddrType (uint8_t addrType) |
Set the local address type used while advertising. This function can be used to configure advertising to use a random address. More... | |
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. If the element already exists in the data then it is replaced with the new value. If the element does not exist in the data it is appended to it, space permitting. More... | |
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 data if it is shortened, the name is shortened and the AD type is changed to DM_ADV_TYPE_SHORT_NAME. More... | |
void | DmAdvSetRandAddr (uint8_t advHandle, const uint8_t *pAddr) |
Set the random device address for a given advertising set. More... | |
void | DmDevPrivInit (void) |
Initialize device privacy module. More... | |
void | DmDevPrivStart (uint16_t changeInterval) |
Start using a private resolvable address. More... | |
void | DmDevPrivStop (void) |
Stop using a private resolvable address. More... | |
void | DmAdvUseLegacyPdu (uint8_t advHandle, bool_t useLegacyPdu) |
Set whether or not to use legacy advertising PDUs with extended advertising. More... | |
void | DmAdvOmitAdvAddr (uint8_t advHandle, bool_t omitAdvAddr) |
Set whether or not to omit advertiser's address from all PDUs (anonymous advertising). More... | |
void | DmAdvIncTxPwr (uint8_t advHandle, bool_t incTxPwr, int8_t advTxPwr) |
Set whether or not to include TxPower in extended header of advertising PDU. More... | |
void | DmAdvSetPhyParam (uint8_t advHandle, uint8_t priAdvPhy, uint8_t secAdvMaxSkip, uint8_t secAdvPhy) |
Set extended advertising PHY parameters. More... | |
void | DmAdvScanReqNotifEnable (uint8_t advHandle, bool_t scanReqNotifEna) |
Set scan request notification enable. More... | |
void | DmAdvSetFragPref (uint8_t advHandle, uint8_t fragPref) |
Set fragment preference for advertising data. More... | |
void | DmPerAdvConfig (uint8_t advHandle) |
Set the advertising parameters for periodic advertising. More... | |
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. More... | |
void | DmPerAdvStart (uint8_t advHandle) |
Start periodic advertising for the advertising set specified by the advertising handle. More... | |
void | DmPerAdvStop (uint8_t advHandle) |
Stop periodic advertising for the advertising set specified by the advertising handle. More... | |
void | DmPerAdvSetInterval (uint8_t advHandle, uint16_t intervalMin, uint16_t intervalMax) |
Set the minimum and maximum advertising intervals for periodic advertising. More... | |
void | DmPerAdvIncTxPwr (uint8_t advHandle, bool_t incTxPwr) |
Set whether or not to include TxPower in extended header of advertising PDU for periodic advertising. More... | |
DM Privacy Functions | |
Functions for controlling Privacy. | |
void | DmPrivInit (void) |
Initialize DM privacy module. More... | |
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 DM_PRIV_RESOLVED_ADDR_IND event. The client must wait to receive this event before executing this function again. More... | |
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_ADD_DEV_TO_RES_LIST_IND event. The client must wait to receive this event before executing this function again. More... | |
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_PRIV_REM_DEV_FROM_RES_LIST_IND event. The client must wait to receive this event before executing this function again. More... | |
void | DmPrivClearResList (void) |
Clear resolving list. When complete the client's callback function is called with a DM_PRIV_CLEAR_RES_LIST_IND event. The client must wait to receive this event before executing this function again. More... | |
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 a DM_PRIV_READ_PEER_RES_ADDR_IND event. The client must wait to receive this event before executing this function again. More... | |
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 DM_PRIV_READ_LOCAL_RES_ADDR_IND event. The client must wait to receive this event before executing this function again. More... | |
void | DmPrivSetAddrResEnable (bool_t enable) |
Enable or disable address resolution in LL. When complete the client's callback function is called with a DM_PRIV_SET_ADDR_RES_ENABLE_IND event. The client must wait to receive this event before executing this function again. More... | |
void | DmPrivSetResolvablePrivateAddrTimeout (uint16_t rpaTimeout) |
Set resolvable private address timeout command. More... | |
void | DmPrivSetPrivacyMode (uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t mode) |
Set privacy mode for a given entry in the resolving list. More... | |
bool_t | DmLlPrivEnabled (void) |
Whether LL Privacy is enabled. More... | |
DM Scanner Functions | |
Functions for controlling Legacy and Extended Scanner behavior. | |
void | DmScanInit (void) |
Initialize DM legacy scanning. More... | |
void | DmExtScanInit (void) |
Initialize DM extended scanning. More... | |
bool_t | DmScanModeLeg (void) |
Whether DM scanning is in legacy mode. More... | |
bool_t | DmScanModeExt (void) |
Whether DM scanning is in extended mode. More... | |
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. More... | |
void | DmScanStop (void) |
Stop scanning. More... | |
void | DmScanSetInterval (uint8_t scanPhys, uint16_t *pScanInterval, uint16_t *pScanWindow) |
Set the scan interval and window for the specified PHYs. More... | |
void | DmScanSetAddrType (uint8_t addrType) |
Set the local address type used while scanning. This function can be used to configure scanning to use a random address. More... | |
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 advertising packets. More... | |
void | DmSyncStop (dmSyncId_t syncId) |
Stop reception of the periodic advertising identified by the given sync identifier. More... | |
void | DmAddDeviceToPerAdvList (uint8_t advAddrType, uint8_t *pAdvAddr, uint8_t advSid) |
Add device to periodic advertiser list. More... | |
void | DmRemoveDeviceFromPerAdvList (uint8_t advAddrType, uint8_t *pAdvAddr, uint8_t advSid) |
DM remove device from periodic advertiser list. More... | |
void | DmClearPerAdvList (void) |
DM clear periodic advertiser list. More... | |
DM Connection Functions | |
Functions for forming connections and managing connection behavior and parameter updates. | |
void | DmConnInit (void) |
Initialize DM connection manager. More... | |
void | DmConnMasterInit (void) |
Initialize DM connection manager for operation as legacy master. More... | |
void | DmExtConnMasterInit (void) |
Initialize DM connection manager for operation as extended master. More... | |
void | DmConnSlaveInit (void) |
Initialize DM connection manager for operation as legacy slave. More... | |
void | DmExtConnSlaveInit (void) |
Initialize DM connection manager for operation as extended slave. More... | |
void | DmConnRegister (uint8_t clientId, dmCback_t cback) |
Register with the DM connection manager. More... | |
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. More... | |
void | DmConnClose (uint8_t clientId, dmConnId_t connId, uint8_t reason) |
Close the connection with the give connection identifier. More... | |
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. More... | |
void | DmConnUpdate (dmConnId_t connId, hciConnSpec_t *pConnSpec) |
Update the connection parameters of an open connection. More... | |
void | DmConnSetScanInterval (uint16_t scanInterval, uint16_t scanWindow) |
Set the scan interval and window for connections to be created with DmConnOpen(). More... | |
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(). More... | |
void | DmConnSetConnSpec (hciConnSpec_t *pConnSpec) |
Set the connection spec parameters for connections to be created with DmConnOpen(). More... | |
void | DmExtConnSetConnSpec (uint8_t initPhys, hciConnSpec_t *pConnSpec) |
Set the extended connection spec parameters for extended connections to be created with DmConnOpen(). More... | |
void | DmConnSetAddrType (uint8_t addrType) |
Set the local address type used for connections created with DmConnOpen(). More... | |
void | DmConnSetIdle (dmConnId_t connId, uint16_t idleMask, uint8_t idle) |
Configure a bit in the connection idle state mask as busy or idle. More... | |
uint16_t | DmConnCheckIdle (dmConnId_t connId) |
Check if a connection is idle. More... | |
void | DmConnReadRssi (dmConnId_t connId) |
Read RSSI of a given connection. More... | |
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 Host has accepted the remote device's request to change connection parameters. More... | |
void | DmRemoteConnParamReqNegReply (dmConnId_t connId, uint8_t reason) |
Negative reply to the HCI remote connection parameter request event. This command is used to indicate that the Host has rejected the remote device's request to change connection parameters. More... | |
void | DmConnSetDataLen (dmConnId_t connId, uint16_t txOctets, uint16_t txTime) |
Set data length for a given connection. More... | |
uint8_t | DmConnRole (dmConnId_t connId) |
Return the connection role indicating master or slave. More... | |
void | DmWriteAuthPayloadTimeout (dmConnId_t connId, uint16_t timeout) |
Set authenticated payload timeout for a given connection. More... | |
DM PHY Control Functions | |
Functions for setting PHY preferences. | |
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. More... | |
void | DmReadPhy (dmConnId_t connId) |
Read the current transmitter PHY and receiver PHY for a given connection. More... | |
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. More... | |
void | DmPhyInit (void) |
Initialize DM PHY. More... | |
DM Device Functions | |
Device control functions | |
void | DmDevReset (void) |
Reset the device. More... | |
void | DmDevSetRandAddr (uint8_t *pAddr) |
Set the random address to be used by the local device. More... | |
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, scanning, or connecting with white list filtering active. More... | |
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, scanning, or connecting with white list filtering active. More... | |
void | DmDevWhiteListClear (void) |
Clear the white list. Note that this function cannot be called while advertising, scanning, or connecting with white list filtering active. More... | |
bool_t | DmDevSetFilterPolicy (uint8_t mode, uint8_t policy) |
Set the Advertising, Scanning or Initiator filter policy. More... | |
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. More... | |
void | DmDevVsInit (uint8_t param) |
Vendor-specific controller initialization function. More... | |
DM Security Functions | |
Functions for accessing and controlling security configuration of device. | |
void | DmSecInit (void) |
Initialize DM security. More... | |
void | DmSecLescInit (void) |
Initialize DM LE Secure Connections security. More... | |
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. More... | |
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 received. More... | |
void | DmSecCancelReq (dmConnId_t connId, uint8_t reason) |
This function is called to cancel the pairing process. More... | |
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 pairing. More... | |
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 encryption. More... | |
void | DmSecEncryptReq (dmConnId_t connId, uint8_t secLevel, dmSecLtk_t *pLtk) |
This function is called by a master device to initiate link encryption. More... | |
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 key used for encryption. More... | |
void | DmSecSetLocalCsrk (uint8_t *pCsrk) |
This function sets the local CSRK used by the device. More... | |
void | DmSecSetLocalIrk (uint8_t *pIrk) |
This function sets the local IRK used by the device. More... | |
void | DmSecGenerateEccKeyReq (void) |
This function generates an ECC key for use with LESC security. More... | |
void | DmSecSetEccKey (secEccKey_t *pKey) |
This function sets the ECC key for use with LESC security. More... | |
secEccKey_t * | DmSecGetEccKey (void) |
This function gets the local ECC key for use with LESC security. More... | |
void | DmSecSetDebugEccKey (void) |
This function sets the ECC key for use with LESC security to standard debug keys values. More... | |
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 contain the Random and Confirm values exchanged via out of band methods. More... | |
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. More... | |
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. More... | |
uint32_t | DmSecGetCompareValue (uint8_t *pConfirm) |
This function returns the 6-digit compare value for the specified 128-bit confirm value. More... | |
DM Internal Functions | |
Functions called internally by the stack. | |
uint8_t | DmLlAddrType (uint8_t addrType) |
Map an address type to a type used by LL. More... | |
uint8_t | DmHostAddrType (uint8_t addrType) |
Map an address type to a type used by Host. More... | |
uint16_t | DmSizeOfEvt (dmEvt_t *pDmEvt) |
Return size of a DM callback event. More... | |
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 response to DM. More... | |
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 peer device. More... | |
dmConnId_t | DmConnIdByHandle (uint16_t handle) |
For internal use only. Find the connection ID with matching handle. More... | |
bool_t | DmConnInUse (dmConnId_t connId) |
For internal use only. Return TRUE if the connection is in use. More... | |
uint8_t | DmConnPeerAddrType (dmConnId_t connId) |
For internal use only. Return the peer address type. More... | |
uint8_t * | DmConnPeerAddr (dmConnId_t connId) |
For internal use only. Return the peer device address. More... | |
uint8_t | DmConnLocalAddrType (dmConnId_t connId) |
For internal use only. Return the local address type. More... | |
uint8_t * | DmConnLocalAddr (dmConnId_t connId) |
For internal use only. Return the local address. More... | |
uint8_t * | DmConnPeerRpa (dmConnId_t connId) |
For internal use only. Return the peer resolvable private address (RPA). More... | |
uint8_t * | DmConnLocalRpa (dmConnId_t connId) |
For internal use only. Return the local resolvable private address (RPA). More... | |
uint8_t | DmConnSecLevel (dmConnId_t connId) |
For internal use only. Return the security level of the connection. More... | |
void | DmSmpEncryptReq (dmConnId_t connId, uint8_t secLevel, uint8_t *pKey) |
For internal use only. This function is called by SMP to request encryption. More... | |
void | DmSmpCbackExec (dmEvt_t *pDmEvt) |
For internal use only. Execute DM callback from SMP procedures. More... | |
uint8_t * | DmSecGetLocalCsrk (void) |
For internal use only. This function gets the local CSRK used by the device. More... | |
uint8_t * | DmSecGetLocalIrk (void) |
For internal use only. This function gets the local IRK used by the device. More... | |
void | DmReadRemoteFeatures (dmConnId_t connId) |
For internal use only. Read the features of the remote device. More... | |
Device Manager subsystem API.
Copyright (c) 2016-2018 Arm Ltd. All Rights Reserved. Arm Ltd. confidential and proprietary.
IMPORTANT. Your use of this file is governed by a Software License Agreement ("Agreement") that must be accepted in order to download or otherwise receive a copy of this file. You may not use or copy this file for any purpose other than as described in the Agreement. If you do not agree to all of the terms of the Agreement do not use this file and delete all copies in your possession or control; if you do not have a copy of the Agreement, you must contact Arm Ltd. prior to any use, copying or further distribution of this software.
Definition in file dm_api.h.