This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GAP Central Connection Establishment and Termination timeout

I would like to configure the connection timeout with the S130v1. This timeout is described in the following sequence diagram: infocenter.nordicsemi.com/.../group___b_l_e___g_a_p___c_e_n_t_r_a_l___c_o_n_n___m_s_c.html

Is this possible to configure it or do I have to add a software timer and cancel the pending request manually ?

If the central software is multi-link can the S130v1 manage multiple pending connection requests ? And is it possible to cancel only one pending connection request ?

Thanks for the help.

  • The connection timeout is one of the parameters to the connection function which starts that diagram, so you just set it.

  • Thank you, I was looking for the uint16_t ble_gap_scan_params_t::timeout parameter.

    According to the doc, I thinks it is not possible... but can we send multiple connection requests ?

    The stack is busy, process pending events and retry. If another connection is being established wait for the corresponding BLE_GAP_EVT_CONNECTED event before calling again.

  • Yes I knew what parameter you were looking for, but I thought just telling you it was there would let you find it fast enough :)

    I don't know the answer to the other question. Seems like you can't, why don't you try it, just ask it to connect to a device which isn't there, pick a random address of some sort and give it a long, long timeout, then try to connect to another one and see what happens. It's quite possible the stack will deal with multiple connections at one time, but is only able to be in the process of making one new connection at once.

    There is a parameter to the sd_ble_enable() which isn't very well explained, central_sec_count, which is the number of concurrent pairing procedures available, never quite figured out what that meant, wondered if bumping that up makes multiple concurrent pending connections work. Probalby not.

  • I did not find any information about that in the doc, so as you suggest I will investigate more by myself.

    It would be great if the SoftDevice could handle automatic re-connection to more than one device. So for instance, when a peripheral device goes out of range and disconnects, I just have to send a connection request with a long timeout just after, and the central device will connect automatically again when the peripheral comes back in range.

    The sd_ble_gap_connect_cancel function takes no parameters, so I think it is not possible to have multiple pending connection requests.

  • No, it is not possible to have concurrent connection procedures. However, the connection parameters can take a (white)list of addresses to connect to. Then the stack will try to connect to any advertiser that matches this list, stopping at the first match. When a connect request is sent, the controller reports this as a successful connection (per the Bluetooth spec), even though the advertiser might not have seen it. You then have to wait for [supervision timeout] milliseconds to see if you get a disconnect again. After this, you have to restart the connection procedure.

Related