This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F: Setting supervision timeout

Part Number: CC2640R2F

Hi everyone,

I've developed a multirole firmware for CC2640R2 starting from multirole example (SDK 1.35.00), but I'm trying to configure and use my device as a central. All works fine.

I want to set a supervision timeout in order to terminate connection if an already connected peripheral go out of my central range.

I've tried to set in multirole_init function

the TGAP_CONN_EST_SUPERV_TIMEOUT parameter as follow

      GAP_SetParamValue(TGAP_CONN_EST_SUPERV_TIMEOUT, RESP_ERR_TIMEOUT);

where RESP_ERR_TIMEOUT is defined as 

#define RESP_ERR_TIMEOUT  10

from TGAP_CONN_EST_SUPERV_TIMEOUT definition

/**
* @brief Connection supervision timeout for connection establishment (n * 10 mSec)
*
* default: 2000
*
* range: 10-3200
*/

the TGAP_CONN_EST_SUPERV_TIMEOUT  is normally setted to 2000 => 20000 mSec => 20 seconds

Because I've setted this timeout to 100 => 1 seconds to terminate connection if a connected peripheral goes out of central range

Unfortunately it seems have not effect, because when I turn off my perifheral without close connection first, or when I bring my peripheral out from central range, I must wait 20 seconds first that connection is closed.

My question is:

Is sufficient configure the TGAP_CONN_EST_SUPERV_TIMEOUT   value to set the supervision timeout?

 

Thanks for the help

Regards

  • Hi Crescenzo,

    Setting TGAP_CONN_EST_SUPERV_TIMEOUT should be sufficient to set the supervision time-out.

    Where in your code are you calling GAP_SetParamValue(TGAP_CONN_EST_SUPERV_TIMEOUT, RESP_ERR_TIMEOUT);?

    Just so you know, TGAP_CONN_EST_SUPERV_TIMEOUT is set to DEFAULT_CONN_TIMEOUT (= 1000) in multi_role_init(). Is it possible that multi_role_init() is overwriting the value in your project?
  • Hi Marie,

    thanks for quick reply.
    I've removed the previous TGAP_CONN_EST_SUPERV_TIMEOUT setting and added my setting, so, it is not setted to DEFAULT_CONN_TIMEOUT anymore.

    For me this solve my question.

    Thanks a lot