Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Connection Interval- NRF_ERROR_INVALID_PARAM

Dear Sir,

We have 4 Nordic devices connected to 1 central. At every 195 to 182 seconds 1 packet is sent from device. 

I tried changing the following parameters just to understand criteria and got the error NRF_ERROR_INVALID_PARAM from sd_ble_gap_ppcp_set().

  1. MIN_CONN_INTERVAL 500
  2. MAX_CONN_INTERVAL 1000
  3. SLAVE_LATENCY 199
  4. CONN_SUP_TIMEOUT (400*1000)

From this post  connection interval error 

found out Supervision_Timeout  >  { (1 + Conn_Latency) * Conn_Interval_Max * 2} , where Conn_Interval_Max is given in milliseconds.

{(1+199) *1000 *2} = (400*1000). 

Can you help us in getting the desired connection intervals?

Regards,

Lakshmi

Parents
  • Hello Lakshmi,

    1. MIN_CONN_INTERVAL 500
    2. MAX_CONN_INTERVAL 1000
    3. SLAVE_LATENCY 199
    4. CONN_SUP_TIMEOUT (400*1000)

    From this post  connection interval error 

    found out Supervision_Timeout  >  { (1 + Conn_Latency) * Conn_Interval_Max * 2} , where Conn_Interval_Max is given in milliseconds.

    Both MIN_CONN_INTERVAL and MAX_CONN_INTERVAL are given as units of 1.25 ms, and so your max interval in this case is 1250 ms, which means that your CONN_SUP_TIMEOUT would need to be at least 500,000 ms to fulfil the inequality in the formula posted.

    However, there is a hard limit on the maximum connection supervision timeout in the BLE specification which is 32 seconds, and so it is not feasible to use a slave latency of 200, please see this post for more information about this.

    Best regards,
    Karl

Reply
  • Hello Lakshmi,

    1. MIN_CONN_INTERVAL 500
    2. MAX_CONN_INTERVAL 1000
    3. SLAVE_LATENCY 199
    4. CONN_SUP_TIMEOUT (400*1000)

    From this post  connection interval error 

    found out Supervision_Timeout  >  { (1 + Conn_Latency) * Conn_Interval_Max * 2} , where Conn_Interval_Max is given in milliseconds.

    Both MIN_CONN_INTERVAL and MAX_CONN_INTERVAL are given as units of 1.25 ms, and so your max interval in this case is 1250 ms, which means that your CONN_SUP_TIMEOUT would need to be at least 500,000 ms to fulfil the inequality in the formula posted.

    However, there is a hard limit on the maximum connection supervision timeout in the BLE specification which is 32 seconds, and so it is not feasible to use a slave latency of 200, please see this post for more information about this.

    Best regards,
    Karl

Children
Related