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

Clarify is_conn_params_ok() function

While investigating connection parameter handling, I noticed the following:

The is_conn_params_ok(ble_gap_conn_params_t * p_conn_params) function in ble_comm_params.c only compares the interval, not the slave latency or connection supervisory timeout. This has the effect of the peripheral accepting connection parameters with a valid interval even though the supervisory timeout is undesirable.

Is there any downside to modifying this to include a test of all the parameters in order to force a negotiation?

  • Hi Aras,

    I don't see any downsize of implementing more checking in that function.

    The reason we don't implement slave latency check and supervision timeout check is that we don't know how much should the tolerance be as the slave latency and timeout don't have an acceptable range to check. We don't want to enforce the latency and timeout to be exactly as the peripheral select as many time the central won't give that.

    You can implement your own, say accept the connection parameters are OK if the timeout is at +-30% range of the actual timeout for example.

Related