This module implements the Central GAP Role.
More...
|
bStatus_t | GAPCentralRole_CancelDiscovery (void) |
| Cancel a device discovery scan. More...
|
|
bStatus_t | GAPCentralRole_EstablishLink (uint8_t highDutyCycle, uint8_t whiteList, uint8_t addrTypePeer, uint8_t *peerAddr) |
| Establish a link to a peer device. More...
|
|
bStatus_t | GAPCentralRole_GetParameter (uint16_t param, void *pValue) |
| Get a parameter in the Central Profile. More...
|
|
bStatus_t | GAPCentralRole_SetParameter (uint16_t param, uint8_t len, void *pValue) |
| Set a parameter in the Central Profile. More...
|
|
bStatus_t | GAPCentralRole_StartDevice (gapCentralRoleCB_t *pAppCallbacks) |
| Start the device in Central role. This function is typically called once during system startup. More...
|
|
bStatus_t | GAPCentralRole_StartDiscovery (uint8_t mode, uint8_t activeScan, uint8_t whiteList) |
| Start a device discovery scan. More...
|
|
bStatus_t | GAPCentralRole_TerminateLink (uint16_t connHandle) |
| Terminate a link. More...
|
|
bStatus_t | GAPCentralRole_UpdateLink (uint16_t connHandle, uint16_t connIntervalMin, uint16_t connIntervalMax, uint16_t connLatency, uint16_t connTimeout) |
| Update the link connection parameters. More...
|
|
This module implements the Central GAP Role.
§ GAPCentralRole_CancelDiscovery()
bStatus_t GAPCentralRole_CancelDiscovery |
( |
void |
| ) |
|
§ GAPCentralRole_EstablishLink()
bStatus_t GAPCentralRole_EstablishLink |
( |
uint8_t |
highDutyCycle, |
|
|
uint8_t |
whiteList, |
|
|
uint8_t |
addrTypePeer, |
|
|
uint8_t * |
peerAddr |
|
) |
| |
§ GAPCentralRole_GetParameter()
bStatus_t GAPCentralRole_GetParameter |
( |
uint16_t |
param, |
|
|
void * |
pValue |
|
) |
| |
Get a parameter in the Central Profile.
- Parameters
-
- Returns
- SUCCESS : Operation successful.
-
INVALIDPARAMETER : Invalid parameter ID.
§ GAPCentralRole_SetParameter()
bStatus_t GAPCentralRole_SetParameter |
( |
uint16_t |
param, |
|
|
uint8_t |
len, |
|
|
void * |
pValue |
|
) |
| |
Set a parameter in the Central Profile.
- Parameters
-
param | profile parameter ID: Central GAPRole 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.
-
bleInvalidRange : len is invalid for the given param
§ GAPCentralRole_StartDevice()
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.
§ GAPCentralRole_StartDiscovery()
bStatus_t GAPCentralRole_StartDiscovery |
( |
uint8_t |
mode, |
|
|
uint8_t |
activeScan, |
|
|
uint8_t |
whiteList |
|
) |
| |
§ GAPCentralRole_TerminateLink()
bStatus_t GAPCentralRole_TerminateLink |
( |
uint16_t |
connHandle | ) |
|
§ GAPCentralRole_UpdateLink()
bStatus_t GAPCentralRole_UpdateLink |
( |
uint16_t |
connHandle, |
|
|
uint16_t |
connIntervalMin, |
|
|
uint16_t |
connIntervalMax, |
|
|
uint16_t |
connLatency, |
|
|
uint16_t |
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.
-
bleNotConnected : No connection to update.
-
INVALIDPARAMETER : connection parameters are invalid
-
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS : connection parameters do not meet Bluetooth low energy specification requirements:
(Supervision Timeout) > (1 + Slave Latency) × (Connection Interval × 2)
-
HCI_ERROR_CODE_UNKNOWN_CONN_ID : connHandle is inactive
-
HCI_ERROR_CODE_CONTROLLER_BUSY : there is already a param update in process
-
HCI_ERROR_CODE_UNACCEPTABLE_CONN_PARAMETERS (0x3B): connection interval does not work because it is not a multiple or divisor of intervals of the other simultaneous connection or the interval of the connection is not less than the allowed maximum connection interval as determined by the maximum number of connections times the number of slots per connection