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

connection parameters change

I am currently developing with nrf52832 sdk14.2. I found in the test that after opening the hid service, the connection parameters will become the following parameters after about 5 seconds:
Conn_sup_timeout: 100
Max_conn_interval: 12
Min_conn_interval: 12
Slave_latency: 4


But this parameter is not my application change, and I did not set this parameter in the gap, the parameters are as follows:
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(40, UNIT_1_25_MS)
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(250, UNIT_1_25_MS)
#define SLAVE_LATENCY 4
#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(6000, UNIT_10_MS)


Is this and hid mandatory change? If this is the parameter that can be set by yourself?

Parents Reply Children
  • Hello,

    Phones typically have different preferred connection parameters. iPhones (and Android I believe) prefer to use a multiple of 15ms, which is what you see (connection intervals is set in number of units where each unit is 1.25ms, so 12 units = 15ms). Please check section 23.6 here.

    Since it is the central that actually decides the connection parameters in a BLE connection, the phone will decide the connection interval. What the peripheral can do is to request other connection intervals, but the central can decide whether to accept it or reject it. The only thing the peripheral can do then is to disconnect (or accept the given connection interval).

    BR,

    Edvin

Related