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

Duplicate BLE_LBS_C_EVT_DISCOVERY_COMPLETE calls for one connection in multilink central example

Hi,

I'm developing an application requiring multiple connections to several peripherals from a single central. I followed the instructions given here https://devzone.nordicsemi.com/f/nordic-q-a/18804/mismatch-between-connection-handles-in-ble_nus#post-id-109939, as well as the code in the multilink central to implement this. However, I noticed some very strange behavior, both in my application as well as in the multilink central example. 

When events occur for of the connections on the central (e.g. discovery complete), this handler is called multiple times for the same connection and the handle is always the same value (i.e. the handle of the connection that the event is for). So there is no way to distinguish them from each other. This is a bit annoying as I use the discovery complete event to notify upper layers of a new connection being fully established, but I only want to do this once for the same connection being setup...

The same problem occurs with other events, such as the TX complete on central side after sending a write command. 

Am I missing something here or is this a particular feature I'll have to deal with? I'm using SDK 15 with SD 140.

Thanks in advance.

Kind regards,

Mathias

Related