This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Who set initial connection parameters on BLE?

Hello! I've some doubt about set-up of initial parameters in a BLE connection, using S110.

In ble_app_lbs I try to change the following macro definitions: MIN_CONN_INTERVAL=500ms,
MAX_CONN_INTERVAL=500ms, SLAVE_LATENCY=7, CONN_SUP_TIMEOUT=4000ms,
and from the master control panel I see the connection parameters are updated after some seconds from connection start-up. Initially was: connection interval=20ms, conn. latency=0, supervision timeout=3000ms, then was successful updated to desired value. However, in application, is not used sd_ble_gap_conn_param_update() but the sd_ble_gap_ppcp_set() function.

I hoped the initial connection parameters was set up at initialization of connection with sd_ble_gap_ppcp_set() function but it seems it's only an update after connection has initialized.

The question is: there is any way to start a connection with custom parameters or is the central that force its preferred parameters? Thank you!

  • The central decides the connection parameters I'm afraid. The PPCP values set by sd_ble_gap_ppcp_set() updates some values in the GATT database that can later be read out by the central device after connecting. Even in connection parameter update (not to be confused with the new 4.1 feature) the peripheral only sends a request, and it is up to the central to decide what the parameters should update to.

    But - it is possible to put the connection interval in your advertisement data, see Core Spec Supplement v4 - Chapter 1.9. It will still be up to the central devices to actually use the advertised intervals, but you could save yourself a connection parameter update if it does. The "Slave connection interval range" will take 4 octets + flag + length, so 6 octets in total.

Related