48 #if !defined ( GAP_BONDINGS_MAX ) 51 #define GAP_BONDINGS_MAX 5 53 #define GAP_BONDINGS_MAX 10 58 #if !defined ( GAP_CHAR_CFG_MAX ) 59 #define GAP_CHAR_CFG_MAX 4 83 #define GAPBOND_PAIRING_MODE 0x400 94 #define GAPBOND_MITM_PROTECTION 0x402 105 #define GAPBOND_IO_CAPABILITIES 0x403 116 #define GAPBOND_OOB_ENABLED 0x404 128 #define GAPBOND_OOB_DATA 0x405 139 #define GAPBOND_BONDING_ENABLED 0x406 153 #define GAPBOND_KEY_DIST_LIST 0x407 160 #define GAPBOND_ERASE_ALLBONDS 0x409 163 #define GAPBOND_AUTO_FAIL_PAIRING 0x40A 164 #define GAPBOND_AUTO_FAIL_REASON 0x40B 176 #define GAPBOND_KEYSIZE 0x40C 191 #define GAPBOND_AUTO_SYNC_AL 0x40D 200 #define GAPBOND_BOND_COUNT 0x40E 212 #define GAPBOND_BOND_FAIL_ACTION 0x40F 226 #define GAPBOND_ERASE_SINGLEBOND 0x410 241 #define GAPBOND_SECURE_CONNECTION 0x411 261 #define GAPBOND_ECCKEY_REGEN_POLICY 0x412 284 #define GAPBOND_ECC_KEYS 0x413 295 #define GAPBOND_SC_HOST_DEBUG 0x414 313 #define GAPBOND_ERASE_BOND_IN_CONN 0x415 332 #define GAPBOND_ALLOW_DEBUG_KEYS 0x416 347 #define GAPBOND_LRU_BOND_REPLACEMENT 0x418 357 #define GAPBOND_ERASE_LOCAL_INFO 0x41A 368 #define GAPBOND_AUTHEN_PAIRING_ONLY 0x41B 380 #define GAPBOND_SAME_IRK_OPTION 0x41C 391 #define GAPBOND_ERASE_BONDS_ON_ADDRESS_CHANGE 0x41D 404 #define GAPBOND_PAIRING_MODE_NO_PAIRING 0x00 406 #define GAPBOND_PAIRING_MODE_WAIT_FOR_REQ 0x01 408 #define GAPBOND_PAIRING_MODE_INITIATE 0x02 416 #define GAPBOND_IO_CAP_DISPLAY_ONLY 0x00 418 #define GAPBOND_IO_CAP_DISPLAY_YES_NO 0x01 420 #define GAPBOND_IO_CAP_KEYBOARD_ONLY 0x02 422 #define GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT 0x03 424 #define GAPBOND_IO_CAP_KEYBOARD_DISPLAY 0x04 432 #define GAPBOND_KEYDIST_PENCKEY 0x01 434 #define GAPBOND_KEYDIST_PIDKEY 0x02 436 #define GAPBOND_KEYDIST_PSIGN 0x04 438 #define GAPBOND_KEYDIST_PLINK 0x08 440 #define GAPBOND_KEYDIST_CENCKEY 0x10 442 #define GAPBOND_KEYDIST_CIDKEY 0x20 444 #define GAPBOND_KEYDIST_CSIGN 0x40 446 #define GAPBOND_KEYDIST_CLINK 0x80 454 #define GAPBOND_SAME_IRK_UPDATE_BOND_REC 0x00 456 #define GAPBOND_SAME_IRK_TERMINATE_LINK 0x01 494 #define GAP_BOND_REC_ID_OFFSET 0 495 #define GAP_BOND_LOCAL_LTK_OFFSET 1 496 #define GAP_BOND_DEV_LTK_OFFSET 2 497 #define GAP_BOND_DEV_IRK_OFFSET 3 498 #define GAP_BOND_DEV_CSRK_OFFSET 4 499 #define GAP_BOND_DEV_SIGN_COUNTER_OFFSET 5 500 #define GAP_BOND_REC_IDS 6 503 #define GAP_BONDED_STATE_NO_RECORD 0xFF 504 #define GAP_BONDED_STATE_UNAUTHENTICATED 0x00 505 #define GAP_BONDED_STATE_AUTHENTICATED 0x01 506 #define GAP_BONDED_STATE_SERVICE_CHANGED 0x02 507 #define GAP_BONDED_STATE_CAR 0x04 508 #define GAP_BONDED_STATE_SECURECONNECTION 0x08 509 #define GAP_BONDED_STATE_RPA_ONLY 0x10 528 #define GAPBOND_PAIRING_STATE_STARTED 0x00 549 #define GAPBOND_PAIRING_STATE_COMPLETE 0x01 568 #define GAPBOND_PAIRING_STATE_ENCRYPTED 0x02 569 #define GAPBOND_PAIRING_STATE_BOND_SAVED 0x03 571 #define GAPBOND_PAIRING_STATE_CAR_READ 0x04 573 #define GAPBOND_PAIRING_STATE_RPAO_READ 0x05 575 #define GAPBOND_GENERATE_ECC_DONE 0x06 592 #define SMP_PAIRING_FAILED_PASSKEY_ENTRY_FAILED 0x01 593 #define SMP_PAIRING_FAILED_OOB_NOT_AVAIL 0x02 599 #define SMP_PAIRING_FAILED_AUTH_REQ 0x03 600 #define SMP_PAIRING_FAILED_CONFIRM_VALUE 0x04 602 #define SMP_PAIRING_FAILED_NOT_SUPPORTED 0x05 608 #define SMP_PAIRING_FAILED_ENC_KEY_SIZE 0x06 609 #define SMP_PAIRING_FAILED_CMD_NOT_SUPPORTED 0x07 611 #define SMP_PAIRING_FAILED_UNSPECIFIED 0x08 617 #define SMP_PAIRING_FAILED_REPEATED_ATTEMPTS 0x09 622 #define SMP_PAIRING_FAILED_INVALID_PARAMETERS 0x0A 627 #define SMP_PAIRING_FAILED_DHKEY_CHECK_FAILED 0x0B 632 #define SMP_PAIRING_FAILED_NUM_COMPARISON_FAILED 0x0C 639 #define GAPBOND_FAIL_NO_ACTION 0x00 641 #define GAPBOND_FAIL_INITIATE_PAIRING 0x01 643 #define GAPBOND_FAIL_TERMINATE_LINK 0x02 649 #define GAPBOND_FAIL_TERMINATE_ERASE_BONDS 0x03 654 #define GAPBOND_FAIL_TERMINATE_ERASE_SINGLE_BOND 0x04 661 #define GAPBOND_SECURE_CONNECTION_NONE 0x00 663 #define GAPBOND_SECURE_CONNECTION_ALLOW 0x01 665 #define GAPBOND_SECURE_CONNECTION_ONLY 0x02 677 #define GAPBOND_REGENERATE_ALWAYS 0x00 679 #define GAPBOND_REGENERATE_NEVER 0xFF 683 #define ECC_KEYLEN 32 691 #define GAPBOND_READ_BY_ADDR 0 693 #define GAPBOND_READ_BY_IDX 1 729 uint16_t connectionHandle,
732 uint32_t numComparison
748 uint16_t connectionHandle,
989 uint8_t *pIdentityAddr);
1021 uint8_t status, uint32_t passcode);
1093 uint8_t *pIdentifier,
GAP_Peer_Addr_Types_t
Address types used for specifying peer address type.
Definition: gap.h:745
Public and Private ECC Keys.
Definition: gapbondmgr.h:773
bStatus_t GAPBondMgr_Pair(uint16_t connHandle)
uint8_t mitm
Definition: gapbondmgr.h:829
#define B_RANDOM_NUM_SIZE
BLE Random Number Size.
Definition: bcomdef.h:124
uint8_t bondFailAction
Definition: gapbondmgr.h:841
uint8_t autoSyncAL
Definition: gapbondmgr.h:834
uint8_t removeLRUBond
Definition: gapbondmgr.h:837
gapBondLTK_t * pLocalLtk
Definition: gapbondmgr.h:849
Structure of NV data for the connected device's encryption information.
Definition: gapbondmgr.h:788
bStatus_t GAPBondMgr_GenerateEccKeys(void)
Generates ECC keys.
uint8_t GapBondMgr_StartEnc(uint16_t connHandle)
uint8_t pairMode
Definition: gapbondmgr.h:828
bStatus_t GAPBondMgr_GetParameter(uint16_t param, void *pValue)
bStatus_t GAPBondMgr_PasscodeRsp(uint16_t connectionHandle, uint8_t status, uint32_t passcode)
void(* pfnPairStateCB_t)(uint16_t connectionHandle, uint8_t state, uint8_t status)
Definition: gapbondmgr.h:747
bStatus_t GAPBondMgr_SCGetLocalOOBParameters(gapBondOOBData_t *localOobData)
Get local Random number and confirm value for secure connection.
uint8_t secureConnection
Definition: gapbondmgr.h:832
uint8_t GAPBondMgr_GetAuthTaskID(void)
Retrieves the Task ID associated with the GAP Bond Manager for authentication purposes.
uint16_t div
Definition: gapbondmgr.h:791
Structure of NV data for the connected device's address information.
Definition: gapbondmgr.h:797
uint8_t eccReGenPolicy
Definition: gapbondmgr.h:835
uint8_t bonding
Definition: gapbondmgr.h:831
uint8_t KeySize
Definition: gapbondmgr.h:836
void GAPBondMgr_ReadCSRKFromNV(uint8_t *keyBuff)
Reads the stored CSRK (Connection Signature Resolving Key) from non-volatile memory into the provided...
gapBondLTK_t * pDevLtk
Definition: gapbondmgr.h:850
uint8_t eccDebugKeys
Definition: gapbondmgr.h:839
uint8 confirm[KEYLEN]
Definition: gapbondmgr.h:783
pfnPasscodeCB_t passcodeCB
Passcode callback.
Definition: gapbondmgr.h:761
bStatus_t GAPBondMgr_FindAddr(uint8_t *pDevAddr, GAP_Peer_Addr_Types_t addrType, uint8_t *pIdx, GAP_Peer_Addr_Types_t *pIdentityAddrType, uint8_t *pIdentityAddr)
Search for an address in the bonding table. If the address is a random private resolvable address...
void GAPBondMgr_Register(gapBondCBs_t *pCB)
Definition: gapbondmgr.h:759
uint32_t * pSignCount
Definition: gapbondmgr.h:853
uint8_t eraseBondWhileInConn
Definition: gapbondmgr.h:840
uint8_t * pSRK
Definition: gapbondmgr.h:852
void(* pfnPasscodeCB_t)(uint8_t *deviceAddr, uint16_t connectionHandle, uint8_t uiInputs, uint8_t uiOutputs, uint32_t numComparison)
Definition: gapbondmgr.h:727
uint8_t GapBondMgr_readBondFromNV(uint8_t mode, uint8_t *pIdentifier, GAP_Peer_Addr_Types_t addrType, gapBondNvRecord_t *pBondRecord)
uint8_t keySize
Definition: gapbondmgr.h:793
Aggregation of values relevant for reading a bond from NV.
Definition: gapbondmgr.h:846
gapBondCharCfg_t * pCharCfg
Definition: gapbondmgr.h:854
uint16_t attrHandle
Definition: gapbondmgr.h:821
Contains part of the GAP Bond Manager Parameters values.
Definition: gapbondmgr.h:826
struct gapBondOOBData gapBondOOBData_t
uint8_t value
Definition: gapbondmgr.h:822
uint8_t GapBondMgr_GetPrevAuth(uint16_t connHandle, uint8_t *pMitmReq, uint8_t *pKeySize)
uint8_t stateFlags
Definition: gapbondmgr.h:815
bStatus_t GAPBondMgr_ServiceChangeInd(uint16_t connectionHandle, uint8_t setParam)
void GAPBondMgr_ReadIRKFromNV(uint8_t *keyBuff)
Reads the Identity Resolving Key (IRK) from non-volatile storage.
GAP_Peer_Addr_Types_t addrType
Definition: gapbondmgr.h:809
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:99
bStatus_t GAPBondMgr_SetParameter(uint16_t param, uint8_t len, void *pValue)
gapBondRec_t * pBondRec
Definition: gapbondmgr.h:848
uint8_t GapBondMgr_writeBondToNv(gapBondRec_t *pBondRec, gapBondLTK_t *pLocalLtk, gapBondLTK_t *pDevLtk, uint8_t *pIRK, uint8_t *pSRK, uint32_t signCount, gapBondCharCfg_t *charCfg)
Write bond record to NV.
uint8_t sameIrkAction
Definition: gapbondmgr.h:842
uint8_t KeyDistList
Definition: gapbondmgr.h:838
uint8_t authenPairingOnly
Definition: gapbondmgr.h:833
#define ECC_KEYLEN
ECC Key Length: 256 bit keys.
Definition: gapbondmgr.h:684
bool GAPBondMgr_isEnable(void)
uint8_t bStatus_t
BLE Generic Status return.
Definition: bcomdef.h:246
uint8 rand[KEYLEN]
Definition: gapbondmgr.h:784
Definition: gapbondmgr.h:781
bStatus_t GAPBondMgr_SCSetRemoteOOBParameters(gapBondOOBData_t *remoteOobData, uint8 OOBDataFlag)
Set remote's OOB parameters for secure connection.
uint8_t ioCap
Definition: gapbondmgr.h:830
bStatus_t GAPBondMgr_ReadLocalLTK(GAP_Peer_Addr_Types_t addrType, uint8_t *pDevAddr, gapBondLTK_t *pLocalLtk)
uint8_t * pIRK
Definition: gapbondmgr.h:851
#define KEYLEN
Default key length.
Definition: bcomdef.h:102
pfnPairStateCB_t pairStateCB
Pairing state callback.
Definition: gapbondmgr.h:762
Structure of NV data for the connected device's characteristic configuration.
Definition: gapbondmgr.h:819