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

Using sd_ble_gap_connect to connect to a set of addresses and whitelisted devices

Hi,

I'm using sd_ble_gap_connect to connect to a set of known address and whitelisted devices. My central periodically (once an hour) needs to check on a known set of devices and rather than poll each individually I thought I would be clever and use the ble_gap_scan_params_t structure with a whitelist. In doing this I've noticed at least one quirk; if I've previously used an IRK but don't set one up later, the old IRK list is still being used ... which is a bit odd and forces me to use a fake IRK list when I really mean none. That aside, this has all worked well but suddenly becomes unstable once the number of peripheral devices exceeds 3. At this point I see connections between devices but then no read/write traffic on those connections.

In order to debug this I'm trying to establish exactly what I should be expecting from using sd_ble_gap_connect in this way. I'm assuming that a connection is made to the first device my central finds and all other connection attempts are abandoned. Is this the case? I suppose my central might be establishing many connection up to the internal limit? I can't find this use of the API documented so any help would be appreciated.

Thanks Tim

Related