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

Is there any relation between connection parameters and occasionally disconnection

I have a system, with cc2540 as central and n51822 as peripheral with s130. Sometimes while they are close to each other, the connection link gets lost. I disabled updating the connection parameters on the client(cc2540), and I set them just on peripheral. Is it acceptable or not? Where I can find best practices/settings on these parameters while I need to get fast feedback on getting out from the RSSI range and also need to do as much as fast on reconnecting;

Could you please clarify me with the impression of these parameters on my occasional disconnection problem?

  • It is the central device that dictates the connection parameters (when connection is established), it can then choose to do a connection parameter update to change them.

    What are your actual connection parameters? See this for how to check. What are the connection parameters when you get the BLE_GAP_EVT_CONNECTED event? Do you get any BLE_GAP_EVT_CONN_PARAM_UPDATE events? What are the connection parameters then?

  • Thanks for your response... I will check parameters as the way you mentioned. But please let me know what are best values to avoid occasionally disconnection problem while I need to get the feedback of true disconnection (when really I get out from the response range by leaving the place/room) as much as fast.

  • You need to find a balance between the connection interval and the supervision timeout. There is no best values, you have to tune them to your use case. What kind of connection interval are you using? What have you set supervision timeout to? Do you know the meaning of these?

  • Yes, I think I know them. These are what I set on peripheral: Minimum Connection interval = 500 ms; Maximum Connection interval = 1000 ms; Slave Latency = 0; Connection supervision timeout = 6 S

    Values I received on BLE_GAP_EVT_CONNECTED event: Minimum Connection interval = 100 ms; Maximum Connection interval = 100 ms; Slave Latency = 0; Connection supervision timeout = 20 S;

    Values I received on BLE_GAP_EVT_CONN_PARAM_UPDATE event: Minimum Connection interval = 500 ms; Maximum Connection interval = 500 ms; Slave Latency = 0; Connection supervision timeout = 6 S;

    Crashing our system because of abnormal disconnection is fatal. Currently, timeout is the reason of crashing our system, on both client and peripheral, while they are really in the response range and are close to each other.

  • Ok. So it seems the peripheral is sending a connection parameter update request, and the central is accepting it, sends a connection parameter update, and the connection parameters are updated.

    If you think the connection parameters are the reason for why you get a disconnect (I'm not sure why you think this?) just change the parameters that you include in the connection parameter update request from the peripheral. Or don't send a CPU request at all, then you will just keep the connection parameters used when connecting (CM = 100 ms, SL = 0, CST = 20 S).

Related