Functions

GAP Bond Manager API Functions

Functions

bStatus_t GAPBondMgr_SetParameter (uint16 param, uint8 len, void *pValue)
 Set a GAP Bond Manager parameter.
bStatus_t GAPBondMgr_GetParameter (uint16 param, void *pValue)
 Get a GAP Bond Manager parameter.
bStatus_t GAPBondMgr_LinkEst (uint8 addrType, uint8 *pDevAddr, uint16 connHandle, uint8 role)
 Notify the Bond Manager that a connection has been made.
uint8 GAPBondMgr_ResolveAddr (uint8 addrType, uint8 *pDevAddr, uint8 *pResolvedAddr)
 Resolve an address from bonding information.
bStatus_t GAPBondMgr_ServiceChangeInd (uint16 connectionHandle, uint8 setParam)
 Set/clear the service change indication in a bond record.
bStatus_t GAPBondMgr_UpdateCharCfg (uint16 connectionHandle, uint16 attrHandle, uint16 value)
 Update the Characteristic Configuration in a bond record.
void GAPBondMgr_Register (gapBondCBs_t *pCB)
 Register callback functions with the bond manager.
bStatus_t GAPBondMgr_PasscodeRsp (uint16 connectionHandle, uint8 status, uint32 passcode)
 Respond to a passcode request.
uint8 GAPBondMgr_ProcessGAPMsg (gapEventHdr_t *pMsg)
 This is a bypass mechanism to allow the bond manager to process GAP messages.
uint8 GAPBondMgr_CheckNVLen (uint8 id, uint8 len)
 This function will check the length of a Bond Manager NV Item.

Function Documentation

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 or FAILURE
bStatus_t GAPBondMgr_GetParameter ( uint16  param,
void *  pValue 
)

Get a GAP Bond Manager parameter.

NOTE: You can call this function with a GAP Parameter ID and it will get a GAP Parameter. GAP Parameters are defined in (gap.h). Also, 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 or INVALIDPARAMETER (invalid paramID)
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 Peripheral/Central Role profile will call this function, if they are included in the project.

Parameters:
addrType - device's address type. Reference GAP_ADDR_TYPE_DEFINES in gap.h
pDevAddr - device's address
connHandle - connection handle
role - master or slave role. Reference GAP_PROFILE_ROLE_DEFINES in gap.h
Returns:
SUCCESS, otherwise failure
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.
uint8 GAPBondMgr_ProcessGAPMsg ( gapEventHdr_t *  pMsg  ) 

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

NOTE: 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.
void GAPBondMgr_Register ( gapBondCBs_t pCB  ) 

Register callback functions with the bond manager.

NOTE: There is no need to register a passcode callback function if the passcode will be handled with the GAPBOND_DEFAULT_PASSCODE parameter.

Parameters:
pCB - pointer to callback function structure.
Returns:
none
uint8 GAPBondMgr_ResolveAddr ( uint8  addrType,
uint8 pDevAddr,
uint8 pResolvedAddr 
)

Resolve an address from bonding information.

Parameters:
addrType - device's address type. Reference GAP_ADDR_TYPE_DEFINES in gap.h
pDevAddr - device'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
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).
bStatus_t GAPBondMgr_SetParameter ( uint16  param,
uint8  len,
void *  pValue 
)

Set a GAP Bond Manager parameter.

NOTE: You can call this function with a GAP Parameter ID and it will set the GAP Parameter. GAP Parameters are defined in (gap.h). Also, the "len" field must be set to the size of a "uint16" and the "pValue" field must point to a "uint16".

Parameters:
param - Profile parameter ID: 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 or INVALIDPARAMETER (invalid paramID)
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).