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

Limits on slave latercy and supervisory timeout setting?

Hi,

I'm trying to modify the slave latency and supervisory timeout setting, but found sometimes the gap_params_init() will get error after changing.

For example, I can set

CONN_SUP_TIMEOUT=10000 (10s)

MAX_CONN_INTERVAL=200 (ms)

SLAVE_LATERCY=10

and this setting works OK, 

but if I change the MAX_CONN_INTERVAL to 500ms it will get error.

If I set

CONN_SUP_TIMEOUT=50000 (50s) 

MAX_CONN_INTERVAL=200 (ms)

SLAVE_LATERCY=10

it will also get error.

My question is , is there a limit about how much are these parameters can be set?

Parents
  • Hi,

    Please refer to the Bluetooth Core specification Version 5.0 | Vol 6, Part B, Ch. 4.5.2 Supervision Timeout:

    "Connection supervision timeout (connSupervisionTimeout) is a parameter that defines the maximum time between two received Data Packet PDUs before the connection is considered lost. The connSupervisionTimeout shall be a multiple of 10 ms in the range of 100 ms to 32.0 s and it shall be larger than (1 + connSlaveLatency) * connInterval * 2."

    If you use:

    CONN_SUP_TIMEOUT=10000 (10s)
    MAX_CONN_INTERVAL=500(ms)
    SLAVE_LATERCY=10

    then CONN_SUP_TIMEOUT is too small (1 + connSlaveLatency) * connInterval * 2 = 11 sec).

    If you use:

    CONN_SUP_TIMEOUT=50000 (50s) 
    MAX_CONN_INTERVAL=200 (ms)
    SLAVE_LATERCY=10

    then CONN_SUP_TIMEOUT is too large (larger than 32 sec). 

    I'm betting it is sd_ble_gap_ppcp_set() that returns NRF_ERROR_INVALID_PARAM when you try to use values outside of spec. 

     

Reply
  • Hi,

    Please refer to the Bluetooth Core specification Version 5.0 | Vol 6, Part B, Ch. 4.5.2 Supervision Timeout:

    "Connection supervision timeout (connSupervisionTimeout) is a parameter that defines the maximum time between two received Data Packet PDUs before the connection is considered lost. The connSupervisionTimeout shall be a multiple of 10 ms in the range of 100 ms to 32.0 s and it shall be larger than (1 + connSlaveLatency) * connInterval * 2."

    If you use:

    CONN_SUP_TIMEOUT=10000 (10s)
    MAX_CONN_INTERVAL=500(ms)
    SLAVE_LATERCY=10

    then CONN_SUP_TIMEOUT is too small (1 + connSlaveLatency) * connInterval * 2 = 11 sec).

    If you use:

    CONN_SUP_TIMEOUT=50000 (50s) 
    MAX_CONN_INTERVAL=200 (ms)
    SLAVE_LATERCY=10

    then CONN_SUP_TIMEOUT is too large (larger than 32 sec). 

    I'm betting it is sd_ble_gap_ppcp_set() that returns NRF_ERROR_INVALID_PARAM when you try to use values outside of spec. 

     

Children
No Data
Related