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: Fast Disconnect Detection?

Part Number: CC2640R2F

Hello,

I am developing applications around the simple_central  and simple_peripheral examples and it is required that in an event of a connection interruption, the connection is restored as soon as possible. Currently, the examples have a large delay between the time of an unexpected disconnect and the state changing from connected to disconnected. I have single stepped it and it seems that this delay is within the ICall. How do I change this delay so the peripheral side can restart advertising asap and the central side can begin rediscovering asap? 

Thanks!

  • You meant when you call disconnect it takes long time for the device to disconnect?
    Or do you mean that when one end disappeared from the connection, the other device took a long time to go back to scan/adv?
  • No it disconnects immediatly when I call that, I am talking about when one end dissapears unexpectedly, the other device takes a long time to scan/adv. This occurs on both the peripheral and central side.
  • Then it's due to supervision timeout. If one device disappears from the connection, then according to the spec, the other device needs to try stay in the connection until supervision timeout.

    So if you want to make it reacts quicker, then shorten your supervision timeout value.
  • Hello Christin,
    Thank you for the replies. I have tried updating the DEFAULT_UPDATE_CONN_TIMEOUT in the central_app and also the DEFAULT_DESIRED_CONN_TIMEOUT in the peripheral to 1, so it should have a 10ms timeout. I am already requesting and receiving a parameter udate from the peripheral side for my connection interval. However, it does not change the duration at all in testing. It seems to be at 10 seconds from a device dissapearing to it posting an event to signal a disconnection. Is there something else I am missing?
    Thanks a bunch!
  • I figured it out. For anyone else wondering, you have to us the GAP_SetParamValue function to set the new parameter. I set it in the init function and it works perfectly. Thanks again Christin!