nRF5 SDK v14.0.0
Modules | Data Structures | Typedefs | Enumerations | Functions
Connection Parameters Negotiation

Module for initiating and executing a connection parameters negotiation procedure. More...

Modules

 Initiating and executing a connection parameters negotiation procedure configuration
 

Data Structures

struct  ble_conn_params_evt_t
 Connection Parameters Module event. More...
 
struct  ble_conn_params_init_t
 Connection Parameters Module init structure. This contains all options and data needed for initialization of the connection parameters negotiation module. More...
 

Typedefs

typedef void(* ble_conn_params_evt_handler_t )(ble_conn_params_evt_t *p_evt)
 Connection Parameters Module event handler type.
 

Enumerations

enum  ble_conn_params_evt_type_t {
  BLE_CONN_PARAMS_EVT_FAILED,
  BLE_CONN_PARAMS_EVT_SUCCEEDED
}
 Connection Parameters Module event type. More...
 

Functions

ret_code_t ble_conn_params_init (const ble_conn_params_init_t *p_init)
 Function for initializing the Connection Parameters module. More...
 
ret_code_t ble_conn_params_stop (void)
 Function for stopping the Connection Parameters module. More...
 
ret_code_t ble_conn_params_change_conn_params (uint16_t conn_handle, ble_gap_conn_params_t *p_new_params)
 Function for changing the current connection parameters to a new set. More...
 

Detailed Description

Module for initiating and executing a connection parameters negotiation procedure.

Enumeration Type Documentation

Connection Parameters Module event type.

Enumerator
BLE_CONN_PARAMS_EVT_FAILED 

Negotiation procedure failed.

BLE_CONN_PARAMS_EVT_SUCCEEDED 

Negotiation procedure succeeded.

Function Documentation

ret_code_t ble_conn_params_change_conn_params ( uint16_t  conn_handle,
ble_gap_conn_params_t p_new_params 
)

Function for changing the current connection parameters to a new set.

Use this function to change the connection parameters to a new set of parameter (ie different from the ones given at init of the module). This function is useful for scenario where most of the time the application needs a relatively big connection interval, and just sometimes, for a temporary period requires shorter connection interval, for example to transfer a higher amount of data. If the given parameters does not match the current connection's parameters this function initiates a new negotiation.

Parameters
[in]conn_handleThe connection to change connection parameters on.
[in]p_new_paramsThis contains the new connections parameters to setup.
Return values
NRF_SUCCESSSuccessfully started Connection Parameter update procedure.
NRF_ERROR_INVALID_ADDRThe provided Connection Parameters pointer is invalid.
NRF_ERROR_INVALID_PARAMThe provided Connection Parameters are not valid.
BLE_ERROR_INVALID_CONN_HANDLEThe provided connection handle is invalid.
NRF_ERROR_INVALID_STATEThe connection is not in a state where this operation can performed.
NRF_ERROR_BUSYCould not start operation at this time. Try again later.
NRF_ERROR_NO_MEMThe SoftDevice lacks the memory to perform the action.
ret_code_t ble_conn_params_init ( const ble_conn_params_init_t p_init)

Function for initializing the Connection Parameters module.

Note
If the negotiation procedure should be triggered when notification/indication of any characteristic is enabled by the peer, then this function must be called after having initialized the services.
Parameters
[in]p_initThis contains information needed to initialize this module.
Return values
NRF_SUCCESSSuccessful initialization.
NRF_ERROR_INVALID_ADDRThe provided Connection Parameters pointer is invalid.
NRF_ERROR_INVALID_PARAMThe provided Connection Parameters are not valid.
NRF_ERROR_NULLp_init was NULL.
NRF_ERROR_INTERNALAn unexpected error occurred.
ret_code_t ble_conn_params_stop ( void  )

Function for stopping the Connection Parameters module.

This function is intended to be used by the application to clean up the connection parameters update module. This will stop the connection parameters update timer if running, thereby preventing any impending connection parameters update procedure. This function must be called by the application when it needs to clean itself up (for example, before disabling the bluetooth SoftDevice) so that an unwanted timer expiry event can be avoided.

Return values
NRF_SUCCESSSuccessfully stopped module.
NRF_ERROR_BUSYCould not complete operation at this time. Try again later. Note that some timers may have been disabled.
NRF_ERROR_INTERNALAn unexpected error occurred.

Documentation feedback | Developer Zone | Subscribe | Updated