TI BLE-Stack for Bluetooth 4.2 API Documentation  3.01.00.07
Modules | Files | Functions
GAPBondMgr

This module implements the GAP Bond Manager For a detailed usage section describing how to send these commands and receive events, see the GAPBondMgr Section of the User's Guide. More...

Modules

 GAP Bond Manager Callbacks
 
 GAP Bond Manager Constants
 
 GAP Bond Manager Structures
 

Files

file  gapbondmgr.h
 GAPBondMgr layer interface.
 

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_ReadCentAddrResChar (uint16 connectionHandle)
 Read Central Address Resolution Characteristic. 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...
 

Detailed Description

This module implements the GAP Bond Manager For a detailed usage section describing how to send these commands and receive events, see the GAPBondMgr Section of the User's Guide.

Function Documentation

§ GAPBondMgr_CheckNVLen()

uint8 GAPBondMgr_CheckNVLen ( uint8  id,
uint8  len 
)

This function will check the length of a Bond Manager NV Item.

Parameters
id- NV ID.
len- lengths in bytes of item.
Returns
SUCCESS
FAILURE

§ GAPBondMgr_GetParameter()

bStatus_t GAPBondMgr_GetParameter ( uint16  param,
void *  pValue 
)

Get a GAP Bond Manager parameter.

Note
The "pValue" field must point to a "uint16".
Parameters
param- Profile parameter ID: GAP Bond Manager Parameters
pValue- pointer 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 will be cast to uint16 pointer).
Returns
SUCCESS
INVALIDPARAMETER

§ GAPBondMgr_LinkEst()

bStatus_t GAPBondMgr_LinkEst ( uint8  addrType,
uint8 *  pDevAddr,
uint16  connHandle,
uint8  role 
)

Notify the Bond Manager that a connection has been made.

Note
The GAP Role profile will call this function
Parameters
addrType- Device Address Type
pDevAddr- device's address
connHandle- connection handle
role- GAP Profile Roles
Returns
SUCCESS
FAILURE

§ GAPBondMgr_LinkTerm()

void GAPBondMgr_LinkTerm ( uint16  connHandle)

Notify the Bond Manager that a connection has been terminated.

Note
The GAP Role profile will call this function
Parameters
connHandle- connection handle

§ GAPBondMgr_PasscodeRsp()

bStatus_t GAPBondMgr_PasscodeRsp ( uint16  connectionHandle,
uint8  status,
uint32  passcode 
)

Respond to a passcode request.

Parameters
connectionHandle- connection handle of the connected device or 0xFFFF if all devices in database.
status- SUCCESS if passcode is available, otherwise see Pairing failure status values.
passcode- integer 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_ProcessGAPMsg()

uint8 GAPBondMgr_ProcessGAPMsg ( gapEventHdr_t pMsg)

This is a bypass mechanism to allow the bond manager to process GAP messages.

Warning
This is an advanced feature and shouldn't be called unless the normal GAP Bond Manager task ID registration is overridden.
Parameters
pMsg- GAP event message
Returns
TRUE if safe to deallocate incoming GAP message
FALSE otherwise.

§ GAPBondMgr_ReadCentAddrResChar()

bStatus_t GAPBondMgr_ReadCentAddrResChar ( uint16  connectionHandle)

Read Central Address Resolution Characteristic.

Send Read By Type Request to get value attribute of Central Address Resolution characteristic. Value determines if peer supports Enhanced Privacy. Bond record will automatically be updated based on peer response

Parameters
connectionHandle- connection handle of the connected device
Returns
SUCCESS : Request was sent successfully.
INVALIDPARAMETER
MSG_BUFFER_NOT_AVAIL.
bleNotConnected
blePending : A response is pending with this server.
bleMemAllocError
bleTimeout : Previous transaction timed out.

§ GAPBondMgr_Register()

void GAPBondMgr_Register ( gapBondCBs_t *  pCB)

Register callback functions with the bond manager.

Warning
It is the application's responsibility to register a callback function if it is requesting / accepting authenticated pairing.
Parameters
pCB- pointer to callback function structure.

§ GAPBondMgr_ResolveAddr()

uint8 GAPBondMgr_ResolveAddr ( uint8  addrType,
uint8 *  pDevAddr,
uint8 *  pResolvedAddr 
)

Resolve an address from bonding information.

Parameters
addrType- Device Address Type
pDevAddr- peer's address
pResolvedAddr- pointer to buffer to put the resolved address
Returns
bonding index (0 - (GAP_BONDINGS_MAX-1) if found
GAP_BONDINGS_MAX if not found

§ GAPBondMgr_ServiceChangeInd()

bStatus_t GAPBondMgr_ServiceChangeInd ( uint16  connectionHandle,
uint8  setParam 
)

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

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

§ GAPBondMgr_SetParameter()

bStatus_t GAPBondMgr_SetParameter ( uint16  param,
uint8  len,
void *  pValue 
)

Set a GAP Bond Manager parameter.

Note
The "len" field must be set to the size of a "uint16" and the "pValue" field must point to a "uint16".
Parameters
param- GAP Bond Manager Parameters
len- length of data to write
pValue- pointer 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 will be cast to uint16 pointer).
Returns
SUCCESS
INVALIDPARAMETER

§ GAPBondMgr_SlaveReqSecurity()

void GAPBondMgr_SlaveReqSecurity ( uint16  connHandle,
uint8  authReq 
)

Notify the Bond Manager that a Slave Security Request is received.

Note
The GAP Role profile will call this function if configured to do so
Parameters
connHandle- connection handle
authReq- slave device's authentication requirements

§ GAPBondMgr_SupportsEnhancedPriv()

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.

Parameters
pPeerIdAddr- peer identity address
Returns
TRUE: Peer supports enhanced privacy.
FALSE: Peer does not support enhanced privacy.

§ GAPBondMgr_syncResolvingList()

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.

Returns
SUCCESS
FAILURE

§ GAPBondMgr_UpdateCharCfg()

bStatus_t GAPBondMgr_UpdateCharCfg ( uint16  connectionHandle,
uint16  attrHandle,
uint16  value 
)

Update the Characteristic Configuration in a bond record.

Parameters
connectionHandle- connection handle of the connected device or 0xFFFF if all devices in database.
attrHandle- attribute handle.
value- characteristic configuration value.
Returns
SUCCESS - bond record found and changed,
bleNoResources - bond record not found (for 0xFFFF connectionHandle),
bleNotConnected - connection not found - connectionHandle is invalid (for non-0xFFFF connectionHandle).
Copyright 2017, Texas Instruments Incorporated