Functions

Central Profile API Functions

Functions

bStatus_t GAPCentralRole_StartDevice (gapCentralRoleCB_t *pAppCallbacks)
 Start the device in Central role. This function is typically called once during system startup.
bStatus_t GAPCentralRole_SetParameter (uint16 param, uint8 len, void *pValue)
 Set a parameter in the Central Profile.
bStatus_t GAPCentralRole_GetParameter (uint16 param, void *pValue)
 Get a parameter in the Central Profile.
bStatus_t GAPCentralRole_TerminateLink (uint16 connHandle)
 Terminate a link.
bStatus_t GAPCentralRole_EstablishLink (uint8 highDutyCycle, uint8 whiteList, uint8 addrTypePeer, uint8 *peerAddr)
 Establish a link to a peer device.
bStatus_t GAPCentralRole_UpdateLink (uint16 connHandle, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout)
 Update the link connection parameters.
bStatus_t GAPCentralRole_StartDiscovery (uint8 mode, uint8 activeScan, uint8 whiteList)
 Start a device discovery scan.
bStatus_t GAPCentralRole_CancelDiscovery (void)
 Cancel a device discovery scan.
bStatus_t GAPCentralRole_StartRssi (uint16 connHandle, uint16 period)
 Start periodic RSSI reads on a link.
bStatus_t GAPCentralRole_CancelRssi (uint16 connHandle)
 Cancel periodic RSSI reads on a link.

Function Documentation

bStatus_t GAPCentralRole_CancelDiscovery ( void   ) 

Cancel a device discovery scan.

Returns:
SUCCESS: Cancel started.
bleInvalidTaskID: Not the task that started discovery.
bleIncorrectMode: Not in discovery mode.
bStatus_t GAPCentralRole_CancelRssi ( uint16  connHandle  ) 

Cancel periodic RSSI reads on a link.

Parameters:
connHandle - connection handle of link
Returns:
SUCCESS: Operation successful.
bleIncorrectMode: No link.
bStatus_t GAPCentralRole_EstablishLink ( uint8  highDutyCycle,
uint8  whiteList,
uint8  addrTypePeer,
uint8 peerAddr 
)

Establish a link to a peer device.

Parameters:
highDutyCycle - TRUE to high duty cycle scan, FALSE if not
whiteList - determines use of the white list: GAP White List Options
addrTypePeer - address type of the peer device: GAP Address Types
peerAddr - peer device address
Returns:
SUCCESS: started establish link process.
bleIncorrectMode: invalid profile role.
bleNotReady: a scan is in progress.
bleAlreadyInRequestedMode: can’t process now.
bleNoResources: too many links.
bStatus_t GAPCentralRole_GetParameter ( uint16  param,
void *  pValue 
)

Get a parameter in the Central Profile.

Parameters:
param - profile parameter ID: GAP Central Role Parameters
pValue - pointer to buffer to contain the read data
Returns:
SUCCESS: Operation successful.
INVALIDPARAMETER: Invalid parameter ID.
bStatus_t GAPCentralRole_SetParameter ( uint16  param,
uint8  len,
void *  pValue 
)

Set a parameter in the Central Profile.

Parameters:
param - profile parameter ID: GAP Central Role 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.
Returns:
SUCCESS: Operation successful.
INVALIDPARAMETER: Invalid parameter ID.
bStatus_t GAPCentralRole_StartDevice ( gapCentralRoleCB_t pAppCallbacks  ) 

Start the device in Central role. This function is typically called once during system startup.

Parameters:
pAppCallbacks - pointer to application callbacks
Returns:
SUCCESS: Operation successful.
bleAlreadyInRequestedMode: Device already started.
bStatus_t GAPCentralRole_StartDiscovery ( uint8  mode,
uint8  activeScan,
uint8  whiteList 
)

Start a device discovery scan.

Parameters:
mode - discovery mode: GAP Device Discovery Modes
activeScan - TRUE to perform active scan
whiteList - TRUE to only scan for devices in the white list
Returns:
SUCCESS: Discovery scan started.
bleIncorrectMode: Invalid profile role.
bleAlreadyInRequestedMode: Not available.
bStatus_t GAPCentralRole_StartRssi ( uint16  connHandle,
uint16  period 
)

Start periodic RSSI reads on a link.

Parameters:
connHandle - connection handle of link
period - RSSI read period in ms
Returns:
SUCCESS: Terminate started.
bleIncorrectMode: No link.
bleNoResources: No resources.
bStatus_t GAPCentralRole_TerminateLink ( uint16  connHandle  ) 

Terminate a link.

Parameters:
connHandle - connection handle of link to terminate or GAP Special Connection Handles
Returns:
SUCCESS: Terminate started.
bleIncorrectMode: No link to terminate.
bStatus_t GAPCentralRole_UpdateLink ( uint16  connHandle,
uint16  connIntervalMin,
uint16  connIntervalMax,
uint16  connLatency,
uint16  connTimeout 
)

Update the link connection parameters.

Parameters:
connHandle - connection handle
connIntervalMin - minimum connection interval in 1.25ms units
connIntervalMax - maximum connection interval in 1.25ms units
connLatency - number of LL latency connection events
connTimeout - connection timeout in 10ms units
Returns:
SUCCESS: Connection update started started.
bleIncorrectMode: No connection to update.