BLE-Stack APIs  1.00.00
Data Structures | Macros | Typedefs | Functions
gapbondmgr.h File Reference

Detailed Description

GAPBondMgr layer interface.

Go to the source code of this file.

Data Structures

struct  gapBondEccKeys_t
 Public and Private ECC Keys. More...
 
struct  gapBondOobSC_t
 Secure Connections Out of Band. More...
 

Macros

#define ECC_KEYLEN   32
 256 bit keys
 
#define GAP_BONDINGS_MAX   10
 Maximum number of bonds that can be saved in NV.
 
#define GAP_CHAR_CFG_MAX   4
 Maximum number of characteristic configuration that can be saved in NV.
 
#define GAPBOND_ALLOW_DEVICE_PRIVACY_MODE   0x419
 Enable / Disable Device Privacy Mode for Bonded devices without RPAO Characteristic (Read/Write) More...
 
#define GAPBOND_AUTO_SYNC_WL   0x40D
 Synchronize the whitelist with bonded devices (Read/Write) More...
 
#define GAPBOND_BOND_COUNT   0x40E
 Gets the total number of bonds stored in NV (Read-only) More...
 
#define GAPBOND_BOND_FAIL_ACTION   0x40F
 The action that the device takes after an unsuccessful bonding attempt (Write-only) More...
 
#define GAPBOND_BONDING_ENABLED   0x406
 Whether to request bonding during pairing (Read/Write) More...
 
#define GAPBOND_DEFAULT_PASSCODE   0x408
 The default passcode to use for passcode pairing (Read/Write) More...
 
#define GAPBOND_ECC_KEYS   0x413
 The private and public keys to use for Secure Connections pairing (Read/Write) More...
 
#define GAPBOND_ECCKEY_REGEN_POLICY   0x412
 ECC Key Regeneration Policy (Read/Write) More...
 
#define GAPBOND_ERASE_ALLBONDS   0x409
 Erase all bonds from SNV and remove all bonded devices (Write) More...
 
#define GAPBOND_ERASE_SINGLEBOND   0x410
 Erase a single bonded device (Write-only) More...
 
#define GAPBOND_FAIL_INITIATE_PAIRING   0x01
 Initiate pairing upon unsuccessful bonding.
 
#define GAPBOND_FAIL_NO_ACTION   0x00
 Take no action upon unsuccessful bonding.
 
#define GAPBOND_FAIL_TERMINATE_ERASE_BONDS   0x03
 Terminate link and erase all existing bonds on device upon unsuccessful bonding.
 
#define GAPBOND_FAIL_TERMINATE_LINK   0x02
 Terminate link upon unsuccessful bonding.
 
#define GAPBOND_INITIATE_WAIT   0x401
 The amount of time (in ms) to wait for a pairing request before sending the slave initiate request (Read/Write) More...
 
#define GAPBOND_IO_CAP_DISPLAY_ONLY   0x00
 Display Only Device.
 
#define GAPBOND_IO_CAP_DISPLAY_YES_NO   0x01
 Display and Yes and No Capable.
 
#define GAPBOND_IO_CAP_KEYBOARD_DISPLAY   0x04
 Both Keyboard and Display Capable.
 
#define GAPBOND_IO_CAP_KEYBOARD_ONLY   0x02
 Keyboard Only.
 
#define GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT   0x03
 No Display or Input Device.
 
#define GAPBOND_IO_CAPABILITIES   0x403
 The I/O capabilities of the local device (Read/Write) More...
 
#define GAPBOND_KEY_DIST_LIST   0x407
 Key distribution list for pairing (Read/Write) More...
 
#define GAPBOND_KEYDIST_MENCKEY   0x10
 Master Encrypton Key.
 
#define GAPBOND_KEYDIST_MIDKEY   0x20
 Master IRK and ID information.
 
#define GAPBOND_KEYDIST_MLINK   0x80
 Master Link Key.
 
#define GAPBOND_KEYDIST_MSIGN   0x40
 Master CSRK.
 
#define GAPBOND_KEYDIST_SENCKEY   0x01
 Slave Encryption Key.
 
#define GAPBOND_KEYDIST_SIDKEY   0x02
 Slave IRK and ID information.
 
#define GAPBOND_KEYDIST_SLINK   0x08
 Slave Link Key.
 
#define GAPBOND_KEYDIST_SSIGN   0x04
 Slave CSRK.
 
#define GAPBOND_KEYSIZE   0x40C
 Key Size used in pairing. (Read/Write) More...
 
#define GAPBOND_LOCAL_OOB_SC_DATA   0x417
 Local OOB Secure Connections Data (Read/Write) More...
 
#define GAPBOND_LOCAL_OOB_SC_ENABLED   0x416
 Validate Local OOB Secure Connections Data (Read/Write) More...
 
#define GAPBOND_LRU_BOND_REPLACEMENT   0x418
 Enable / Disable LRU Bond Replacement Scheme (Read/Write) More...
 
#define GAPBOND_MITM_PROTECTION   0x402
 Whether to use authenticated pairing (Read/Write) More...
 
#define GAPBOND_OOB_DATA   0x405
 OOB data to use for pairing (Read/Write) More...
 
#define GAPBOND_OOB_ENABLED   0x404
 Whether to use OOB for pairing (Read/Write) More...
 
#define GAPBOND_PAIRING_MODE   0x400
 Whether to allow pairing, and if so, whether to initiate pairing. (Read/Write) More...
 
#define GAPBOND_PAIRING_MODE_INITIATE   0x02
 Don't wait, initiate a pairing request or slave security request.
 
#define GAPBOND_PAIRING_MODE_NO_PAIRING   0x00
 Pairing is not allowed.
 
#define GAPBOND_PAIRING_MODE_WAIT_FOR_REQ   0x01
 Wait for a pairing request or slave security request.
 
#define GAPBOND_PAIRING_STATE_BOND_SAVED   0x03
 Bonding record saved in NV.
 
#define GAPBOND_PAIRING_STATE_BONDED   0x02
 Bonding Complete. More...
 
#define GAPBOND_PAIRING_STATE_CAR_READ   0x04
 Central Address Resolution Characteristic Read.
 
#define GAPBOND_PAIRING_STATE_COMPLETE   0x01
 Pairing Complete. More...
 
#define GAPBOND_PAIRING_STATE_RPAO_READ   0x05
 Resolvable Private Address Only Characteristic Read.
 
#define GAPBOND_PAIRING_STATE_STARTED   0x00
 Pairing Started. More...
 
#define GAPBOND_REGENERATE_ALWAYS   0x00
 Regenerate after each usage.
 
#define GAPBOND_REGENERATE_NEVER   0xFF
 Never regenerate, always use the same pair.
 
#define GAPBOND_REMOTE_OOB_SC_DATA   0x415
 Remote OOB Secure Connections Data (Read/Write) More...
 
#define GAPBOND_REMOTE_OOB_SC_ENABLED   0x414
 Validate Remote OOB Secure Connections Data (Read/Write) More...
 
#define GAPBOND_SECURE_CONNECTION   0x411
 Define Secure Connections Usage during Pairing (Read/Write) More...
 
#define GAPBOND_SECURE_CONNECTION_ALLOW   0x01
 Secure Connections are supported.
 
#define GAPBOND_SECURE_CONNECTION_NONE   0x00
 Secure Connections not supported.
 
#define GAPBOND_SECURE_CONNECTION_ONLY   0x02
 Secure Connections Only Mode.
 
#define SMP_PAIRING_FAILED_AUTH_REQ   0x03
 The pairing procedure can't be performed as authentication requirements can't be met due to IO capabilities of one or both devices.
 
#define SMP_PAIRING_FAILED_CMD_NOT_SUPPORTED   0x07
 The SMP command received is not supported on this device.
 
#define SMP_PAIRING_FAILED_CONFIRM_VALUE   0x04
 The confirm value doesn't match the calculated compare value.
 
#define SMP_PAIRING_FAILED_DHKEY_CHECK_FAILED   0x0B
 Indicates to the remote device that the DHKey Check value received does not match the one calculated by the local device.
 
#define SMP_PAIRING_FAILED_ENC_KEY_SIZE   0x06
 The resultant encryption key size is insufficient for the security requirements of this device.
 
#define SMP_PAIRING_FAILED_INVALID_PARAMETERS   0x0A
 Indicates that the command length is invalid or that a parameter is outside of the specified range.
 
#define SMP_PAIRING_FAILED_NOT_SUPPORTED   0x05
 Pairing isn't supported by the device.
 
#define SMP_PAIRING_FAILED_NUM_COMPARISON_FAILED   0x0C
 Indicates that the confirm value in the numeric comparison protocol do not match.
 
#define SMP_PAIRING_FAILED_OOB_NOT_AVAIL   0x02
 The OOB data is not available.
 
#define SMP_PAIRING_FAILED_PASSKEY_ENTRY_FAILED   0x01
 The user input of the passkey failed, for example, the user cancelled the operation.
 
#define SMP_PAIRING_FAILED_REPEATED_ATTEMPTS   0x09
 Pairing or authentication procedure is disallowed because too little time has elapsed since the last pairing request or security request.
 
#define SMP_PAIRING_FAILED_UNSPECIFIED   0x08
 Pairing failed due to an unspecified reason.
 

Typedefs

typedef void(* pfnPairStateCB_t) (uint16 connectionHandle, uint8 state, uint8 status)
 Pairing State Callback Function. More...
 
typedef void(* pfnPasscodeCB_t) (uint8 *deviceAddr, uint16 connectionHandle, uint8 uiInputs, uint8 uiOutputs, uint32 numComparison)
 Passcode and Numeric Comparison Callback Function. More...
 

Functions

uint8 GAPBondMgr_CheckNVLen (uint8 id, uint8 len)
 This function will check the length of a Bond Manager NV Item. More...
 
bStatus_t GAPBondMgr_GetParameter (uint16 param, void *pValue)
 Get a GAP Bond Manager parameter. More...
 
bStatus_t GAPBondMgr_LinkEst (uint8 addrType, uint8 *pDevAddr, uint16 connHandle, uint8 role)
 Notify the Bond Manager that a connection has been made. More...
 
void GAPBondMgr_LinkTerm (uint16 connHandle)
 Notify the Bond Manager that a connection has been terminated. More...
 
bStatus_t GAPBondMgr_PasscodeRsp (uint16 connectionHandle, uint8 status, uint32 passcode)
 Respond to a passcode request. More...
 
uint8 GAPBondMgr_ProcessGAPMsg (gapEventHdr_t *pMsg)
 This is a bypass mechanism to allow the bond manager to process GAP messages. More...
 
bStatus_t GAPBondMgr_ReadGattChar (uint16 connectionHandle, uint16 uuid)
 Send Read By Type Request to retrieve the value of a characteristic with the specified uuid. More...
 
void GAPBondMgr_Register (gapBondCBs_t *pCB)
 Register callback functions with the bond manager. More...
 
uint8 GAPBondMgr_ResolveAddr (uint8 addrType, uint8 *pDevAddr, uint8 *pResolvedAddr)
 Resolve an address from bonding information. More...
 
bStatus_t GAPBondMgr_ServiceChangeInd (uint16 connectionHandle, uint8 setParam)
 Set/clear the service change indication in a bond record. More...
 
bStatus_t GAPBondMgr_SetParameter (uint16 param, uint8 len, void *pValue)
 Set a GAP Bond Manager parameter. More...
 
void GAPBondMgr_SlaveReqSecurity (uint16 connHandle, uint8 authReq)
 Notify the Bond Manager that a Slave Security Request is received. More...
 
uint8 GAPBondMgr_SupportsEnhancedPriv (uint8 *pPeerIdAddr)
 Determine if peer device supports enhanced privacy by checking the Enhanced Privacy state flag of the bond record that corresponds to the peer's identity address. More...
 
bStatus_t GAPBondMgr_syncResolvingList (void)
 This function will add all device address and IRK pairs from bond records to the Controller. Used with PRIVACY_1_2_CFG. More...
 
bStatus_t GAPBondMgr_UpdateCharCfg (uint16 connectionHandle, uint16 attrHandle, uint16 value)
 Update the Characteristic Configuration in a bond record. More...
 
Copyright 2017, Texas Instruments Incorporated