TI BLE5-Stack API Documentation  2.02.05.00
Modules | Macros
GAP Bond Manager Constants

Modules

 Bonding Failure Actions
 
 GAP Bond Manager ECC Re-use count before
 
 GAP Bond Manager I/O Capabilities
 
 GAP Bond Manager Key Distribution
 
 GAP Bond Manager Pairing Modes
 
 GAP Bond Manager Secure Connections options
 
 Pairing failure status values
 
 SM AuthReq Bonding Flags
 
 SM I/O Capabilities
 
 SM Message opcocdes
 
 SM Passkey Types (Bit Masks)
 

Macros

#define ECC_KEYLEN   32
 ECC Key Length: 256 bit keys.
 
#define GAP_BOND_DEV_CSRK_OFFSET   4
 NV ID for the bonding records' device CSRK.
 
#define GAP_BOND_DEV_IRK_OFFSET   3
 NV ID for the bonding records' device IRK.
 
#define GAP_BOND_DEV_LTK_OFFSET   2
 NV ID for the bonding records' device LTK information.
 
#define GAP_BOND_DEV_SIGN_COUNTER_OFFSET   5
 NV ID for the bonding records' device Sign Counter.
 
#define GAP_BOND_LOCAL_LTK_OFFSET   1
 NV ID for the bonding record's local LTK information.
 
#define GAP_BOND_REC_ID_OFFSET   0
 NV ID for the main bonding record. More...
 
#define GAP_BOND_REC_IDS   6
 
#define GAP_BONDED_STATE_AUTHENTICATED   0x01
 
#define GAP_BONDED_STATE_CAR   0x04
 
#define GAP_BONDED_STATE_RPA_ONLY   0x10
 
#define GAP_BONDED_STATE_SECURECONNECTION   0x08
 
#define GAP_BONDED_STATE_SERVICE_CHANGED   0x02
 
#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 PASSKEY_LEN   6
 Passkey Character Length (ASCII Characters)
 
#define SM_AUTH_MITM_MASK(a)   (((a) & 0x04) >> 2)
 MITM Mask.
 
#define SM_AUTH_STATE_AUTHENTICATED   0x04
 Authenticate requested.
 
#define SM_AUTH_STATE_BONDING   0x01
 Bonding requested.
 
#define SM_AUTH_STATE_SECURECONNECTION   0x08
 Secure Connection requested.
 
#define SM_ECC_KEY_LEN   32
 ECC Key length in bytes.
 
#define SM_ECC_KEYS_NOT_AVAILABLE   0xFF
 Initial state of recycled keys before they exist.
 
#define SM_ECC_KEYS_REGENERATE_ALWAYS   0x00
 Always regenerate the keys.
 
#define SM_ECC_KEYS_REGNENERATE_NEVER   0xFF
 Never regenerate the keys.
 

Detailed Description

Macro Definition Documentation

§ GAP_BOND_REC_ID_OFFSET

#define GAP_BOND_REC_ID_OFFSET   0

NV ID for the main bonding record.

GAP Bond Manager NV layout

The NV definitions: BLE_NVID_GAP_BOND_START - starting NV ID gapBond_maxBonds - Maximum number of bonding allowed (32 is max for number of NV IDs allocated in bcomdef.h).

A single bonding entry consists of 6 components (NV items): Bond Record - defined as gapBondRec_t and uses GAP_BOND_REC_ID_OFFSET for an NV ID local LTK Info - defined as gapBondLTK_t and uses GAP_BOND_LOCAL_LTK_OFFSET for an NV ID device LTK Info - defined as gapBondLTK_t and uses GAP_BOND_DEV_LTK_OFFSET for an NV ID device IRK - defined as "uint8_t devIRK[KEYLEN]" and uses GAP_BOND_DEV_IRK_OFFSET for an NV ID device CSRK - defined as "uint8_t devCSRK[KEYLEN]" and uses GAP_BOND_DEV_CSRK_OFFSET for an NV ID device Sign Counter - defined as a uint32_t and uses GAP_BOND_DEV_SIGN_COUNTER_OFFSET for an NV ID

When the device is initialized for the first time, all (gapBond_maxBonds) NV items are created and initialized to all 0xFF's. A bonding record of all 0xFF's indicates that the bonding record is empty and free to use.

The calculation for each bonding records NV IDs: MAIN_RECORD_NV_ID = ((bondIdx * GAP_BOND_REC_IDS) + BLE_NVID_GAP_BOND_START) LOCAL_LTK_NV_ID = (((bondIdx * GAP_BOND_REC_IDS) + GAP_BOND_LOCAL_LTK_OFFSET) + BLE_NVID_GAP_BOND_START)

© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale