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

Why BLE_LBS_C_EVT_DISCOVERY_COMPLETE is called NRF_SDH_BLE_CENTRAL_LINK_COUNT number of times

In multi-link central app, after BLE_GAP_EVT_CONNECTED event, BLE_LBS_C_EVT_DISCOVERY_COMPLETE is called NRF_SDH_BLE_CENTRAL_LINK_COUNT number of times.

So For example, I change NRF_SDH_BLE_CENTRAL_LINK_COUNT from 8 to 6 then BLE_LBS_C_EVT_DISCOVERY_COMPLETE is called 6 times.

This is confusing, and I can't track down why this happens. Why does this happen? I assumed that BLE_LBS_C_EVT_DISCOVERY_COMPLETE was called after a device was connected, and only for that device, so only once, not eight times.

Thanks.

  • Question is how many active links do you have? Also note that Central means GAP layer while service discovery is on GATT. So I only assume that all your Central links are supposed to act as GATT Client;) What are connection handles during each of these BLE_LBS_C_EVT_DISCOVERY_COMPLETE? I understood from some hints by Nordic support on this forum that certain nRF5 SDK modules are not really meant or ready for multi-instance usage so what module you use and is it usable for multiple connections/GATT clients?

Related