Hi!
We develop multilink central FW for nRF 52840 having NRF_SDH_BLE_CENTRAL_LINK_COUNT = 6.
For enumerating connections and get info about concret connection, we use array with size of NRF_SDH_BLE_CENTRAL_LINK_COUNT (6).
If to see an example "ble_app_multilink_central" we see that to assign a connection handle, a current conn_handle is used as index of array of m_lbs_c and m_db_disc.
But, I thought about this: For example: we have the maximum number of connections (6), and we have last active connection handle = 5.
After which there is one disconnection (for exaple conn_handle was 3), and then reconnection to the same device what will the connection handle be? 6 or 3 ?
Because if the handle number increment by SD and in that situation next handle may be set to array, it exceeds the size of the array, there will be an exception.
My question is: Is it safe to use the connection handle as an index of array, or still need to implement own control algorithm?