KB: How to control connection parameters using BLE Explorer

Introduction

Every BLE connection is defined using connection parameters. Three of the connection parameters can be controlled by BLE Explorer:

Connection interval

The range is between 7.5 milliseconds - 4.0 seconds in increments of 1.25 milliseconds. The parameter is set by the central device in the connection request packet. The central may take into account the PPCP. PPCP is a way for the peripheral to inform the central about the preferred parameters. It is up to the central whether to respect or ignore the request.

Peripheral Latency

The peripheral latency parameter allows the peripheral to skip a number of consecutive
connection events and not listen to the central at these connection events without
compromising the connection. This allows the peripheral to sleep for longer periods of
time, potentially reducing power consumption. The peripheral latency value defines the
number of connection events it can safely skip.

For example, if the peripheral latency is set to 3, then the peripheral may skip 3
consecutive connection events.

Supervision Timeout

The supervision timeout is used to detect a loss in connection. It is defined as the
maximum time between two received data packets before the Connection is
considered lost. Its value ranges between 100 milliseconds - 32 seconds in
increments of 10 milliseconds. Another condition for this timeout value is:

π‘†π‘’π‘π‘’π‘Ÿπ‘£π‘–π‘ π‘–π‘œπ‘›π‘‡π‘–π‘šπ‘’π‘œπ‘’π‘‘ > (1 + π‘π‘œπ‘›π‘›PeripheralπΏπ‘Žπ‘‘π‘’π‘›π‘π‘¦) * π‘π‘œπ‘›π‘›πΌπ‘›π‘‘π‘’π‘Ÿπ‘£π‘Žπ‘™ * 2

The one exception, where the supervision timeout does not apply, is after a
connection is created but not yet established. In this case, the central will consider the
connection to be lost if it does not receive the first packet from the peripheral within:

6 * π‘π‘œπ‘›π‘›πΌπ‘›π‘‘π‘’π‘Ÿπ‘£π‘Žπ‘™

How to modify connection parameters using BLE Explorer

Prerequisites:

  • BLE Explorer is installed
  • (RSL10) USB dongle is up and running

Connection parameters setup:

  • Connect the (RSL10) USB dongle to a USB slot on your PC.
  • Launch the (RSL10) BLE explorer.
  • Select the COM port associated with the (RSL10) USB dongle.
  • Start scanning for BLE devices by clicking on Scan switch (orange color of the switch indicates scanning is ON, and if the color is gray then scanning is OFF).
  • Open Connection Parameters Setup – click on Setup and select Connection from the drop down list.
  • Modify the connection parameters as needed (interval, Peripheral Latency, Timeout).

Hello Alexander, I have problem with these parameters. I use ble_peripheral_server_cgm code and change these parameters at below.
#define APP_PREF_SLV_MIN_CON_INTERVAL 8
#define APP_PREF_SLV_MAX_CON_INTERVAL 10
#define APP_PREF_SLV_LATENCY 0
#define APP_PREF_SLV_SUP_TIMEOUT 200

However when I looked at from power monitor, nothing changes. How can I change these parameter ?
Also I tried to these function GAPC_ParamUpdateCmd() , it does not work also.

Thanks

Hello Ceran Omur,

Thank you for contacting.

The peripheral, in this case CGM, is capable to propose the connection parameters to the central via parameter update command for example, but the final decision whether to accept or reject the parameters is made on central device side.

In other words, requesting to update the connection parameters using the method which was described early might not lead to actually changing them

Please let me know if you have any other questions

Thanks,
Alex

Hello Ceran Omur,

Please review BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C - Chapter#12.3 in regards to peripheral preferred connection parameters characteristic supported format.

In CGM peripheral sample the PPCP can be enabled by implementing the following steps:

  1. GAP extended configuration in the database. Please update the app_config.c source file with the following lines:

      //.att_and_ext_cfg = GAPM_DEFAULT_ATT_CFG,
        .att_and_ext_cfg = GAPM_DEFAULT_ATT_CFG |
                           GAPM_MASK_ATT_SLV_PREF_CON_PAR_EN,
    
  1. GAPC_DEV_SLV_PREF_PARAMS request in void GAPC_GetDevInfoCfm() function. The original function is located in ble_gap.c source file and supports β€œdevice name” and β€œappearance”. For more information about the GAPC_GET_DEV_INFO_REQ_IND API function please review GAP Interface Specification, RW-BLE-GAP-IS_2mbps document, chapter 5.4.9.

Please let me know if you have any other questions

Sincerely,
Alex Brezinov

Hello Alexander, thank you very much for these informations and it is very useful. The preferred connection parameters are different for android and ios device. For android mobile phone, parameters are
#define min_conn_interval 96
#define max_conn_interval 96
#define slavelatency 4
#define slave_supervision_timeout 2000
#define ce_lenMin 0xFFFF
#define ce_lenMax 0xFFFF //ask why_
For ios mobile phone , the parameters are
#define min_conn_interval 96
#define max_conn_interval 110
#define slavelatency 3
#define slave_supervision_timeout 200
#define ce_lenMin 0xFFFF
#define ce_lenMax 0xFFFF //ask why_

I want to make them for both operating system. At frontend side , the phone operating system can be determined but I don’t know if there is an event for that or not ? Do you have any idea about how to change parameter for different mobile operating system ? All I want is determining phone operating system and according to this information, I will change connection parameters.

Thanks for your help.

Hello Ceran Omur,

Company identifies are unique numbers and assigned by Bluetooth SIG. Please review the Bluetooth SIG page for more information.

Company identifier is included in Manufacturing Specific Data of advertising packet, scan response

Please let me know if you have any other questions

Sincerely,
Alex Brezinov