TI BLE5-Stack API Documentation  1.01.12.00
Modules | Files | Functions
GAPBondMgr

Modules

 GAP Bond Manager Callbacks
 
 GAP Bond Manager Constants
 
 GAP Bond Manager Pairing State Events
 
 GAP Bond Manager Parameters
 
 GAP Bond Manager Structures
 

Files

file  gapbondmgr.h
 

Functions

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, attempt to resolve the random address against all IRK's in bonding table. As output parameters, return the following: More...
 
bStatus_t GAPBondMgr_GetParameter (uint16_t param, void *pValue)
 
bStatus_t GAPBondMgr_Pair (uint16_t connHandle)
 
bStatus_t GAPBondMgr_PasscodeRsp (uint16_t connectionHandle, uint8_t status, uint32_t passcode)
 
void GAPBondMgr_Register (gapBondCBs_t *pCB)
 
bStatus_t GAPBondMgr_ServiceChangeInd (uint16_t connectionHandle, uint8_t setParam)
 
bStatus_t GAPBondMgr_SetParameter (uint16_t param, uint8_t len, void *pValue)
 

Detailed Description

This module implements the GAP Bond Manager

Function Documentation

§ GAPBondMgr_FindAddr()

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, attempt to resolve the random address against all IRK's in bonding table. As output parameters, return the following:

  • index into bonding table if the address (or resolved address) is found
  • identity address type if a resolved address was found. Only valid if the input address is random private resolvable
  • identity address if a resolved address was found. Only valid if the input address is random private resolvable

Note that the output parameters are optional. If it is not desired for them to be returned, a NULL pointer can safely be passed.

Parameters
pDevAddrpeer's address
addrTypepeer's address type
pIdxpointer to byte to put the bond index if found
pIdentityAddrTypepointer to byte to put the identity address type if applicable
pIdentityAddrpointer to buffer to put the identity address type if applicable
Returns
SUCCESS if the address was found or resolved to an address in the bonding table
INVALIDPARAMETER if a NULL address is passed in
bleGAPNotFound if the address was not found and didn't resolve to any addresses in the bonding table

§ GAPBondMgr_GetParameter()

bStatus_t GAPBondMgr_GetParameter ( uint16_t  param,
void *  pValue 
)

Get a GAP Bond Manager parameter.

Note
The "pValue" field must point to a "uint16_t".
Parameters
paramProfile parameter ID: GAP Bond Manager Parameters
pValuepointer to location to get the value. This is dependent on the parameter ID and WILL be cast to the appropriate data type (example: data type of uint16_t will be cast to uint16_t pointer).
Returns
SUCCESS
INVALIDPARAMETER

§ GAPBondMgr_Pair()

bStatus_t GAPBondMgr_Pair ( uint16_t  connHandle)

Start (or re-start) the pairing process

This API can be used to initiate pairing in cases where it is not started automatically by the gapbondmgr or to re-pair after the initial pairing has occurred if, for example, the pairing requirements have changed.

Note
Pairing will occur automatically if GAPBOND_PAIRING_MODE is set to GAPBOND_PAIRING_MODE_INITIATE or GAPBOND_PAIRING_MODE is set to GAPBOND_PAIRING_MODE_WAIT_FOR_REQ and a pairing request is received. In these cases, this API is not needed and will fail since pairing is already in progress.
Parameters
connHandleconnection handle to initiate pairing with
Returns
SUCCESS
bleAlreadyInRequestedMode already pairing

§ GAPBondMgr_PasscodeRsp()

bStatus_t GAPBondMgr_PasscodeRsp ( uint16_t  connectionHandle,
uint8_t  status,
uint32_t  passcode 
)

Respond to a passcode request.

Parameters
connectionHandleconnection handle of the connected device or 0xFFFF if all devices in database.
statusSUCCESS if passcode is available, otherwise see Pairing failure status values.
passcodeinteger value containing the passcode.
Returns
SUCCESS bond record found and changed,
bleIncorrectMode Link not found.
INVALIDPARAMETER : passcode is out of range
bleMemAllocError : heap is out of memory

§ GAPBondMgr_Register()

void GAPBondMgr_Register ( gapBondCBs_t pCB)

Register callback functions with the bond manager.

Parameters
pCBpointer to callback function structure.

§ GAPBondMgr_ServiceChangeInd()

bStatus_t GAPBondMgr_ServiceChangeInd ( uint16_t  connectionHandle,
uint8_t  setParam 
)

Set/clear the service change indication in a bond record.

Parameters
connectionHandleconnection handle of the connected device or 0xFFFF if all devices in database.
setParamTRUE to set the service change indication, FALSE to clear it.
Returns
SUCCESS bond record found and changed,
bleNoResources bond record not found
bleNotConnected connection not found connectionHandle is invalid (for non-0xFFFF connectionHandle).

§ GAPBondMgr_SetParameter()

bStatus_t GAPBondMgr_SetParameter ( uint16_t  param,
uint8_t  len,
void *  pValue 
)

Set a GAP Bond Manager parameter.

Note
The "len" field must be set to the size of a "uint16_t" and the "pValue" field must point to a "uint16_t".
Parameters
paramGAP Bond Manager Parameters
lenlength of data to write
pValuepointer to data to write. This is dependent on the parameter ID and WILL be cast to the appropriate data type (example: data type of uint16_t will be cast to uint16_t pointer).
Returns
SUCCESS
INVALIDPARAMETER
© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale