S145 SoftDevice for nRF54LV10 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gap_data_length_update()

uint32_t sd_ble_gap_data_length_update ( uint16_t conn_handle,
ble_gap_data_length_params_t const * p_dl_params,
ble_gap_data_length_limitation_t * p_dl_limitation )

#include <ble_gap.h>

Initiate or respond to a Data Length Update Procedure.

Note
If the application uses BLE_GAP_DATA_LENGTH_AUTO for one or more members of p_dl_params, the SoftDevice will choose the highest value supported in current configuration and connection parameters.
Parameters
[in]conn_handleConnection handle.
[in]p_dl_paramsPointer to local parameters to be used in Data Length Update Procedure. Set any member to BLE_GAP_DATA_LENGTH_AUTO to let the SoftDevice automatically decide the value for that member. Set to NULL to use automatic values for all members.
[out]p_dl_limitationPointer to limitation to be written when local device does not have enough resources or does not support the requested Data Length Update parameters. Ignored if NULL.
Relevant Message Sequence Charts
Data Length Update Procedure
Return values
NRF_SUCCESSSuccessfully set Data Length Extension initiation/response parameters.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.
BLE_ERROR_INVALID_CONN_HANDLEInvalid connection handle parameter supplied.
NRF_ERROR_INVALID_STATENo link has been established.
NRF_ERROR_INVALID_PARAMInvalid parameters supplied.
NRF_ERROR_RESOURCESEither:
  • The requested parameters are not supported by the SoftDevice.
  • The connection event length configured for this link is not sufficient for the requested parameters. Use sd_ble_cfg_set with BLE_CONN_CFG_GAP to increase the connection event length. Inspect p_dl_limitation to see where the limitation is.
NRF_ERROR_BUSYPeer has already initiated a Data Length Update Procedure. Process the pending BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST event to respond.
BLE_ERROR_UNSUPPORTED_REMOTE_FEATUREPeer has indicated that it does not support Data Length Update procedure. Note that this only applies if the Data Length Update procedure is self initiated.