I'm currently looking into improving BLE connection reliability in my application by reviewing my connection parameters, scan intervals etc. But have noticed that a scan window is missed reasonably often and I'd like to know why in case there is a problem with my timings
I'm testing my SDK v15.3 s332 v6.1.1 application on a NRF52832 dev kit with the Nordic PPK to visualise the timings.
My application is acting as a central and peripheral and supports up to 5 peripheral connections and 8 central connections.
So 13 connections with an event length of 2.5 ms + tscanReserved, makes 33.75ms (13*2.5 + 0.76 = 33.26ms, round up to nearest 1.25ms).
So my parameters are:
- min/max conn interval 33.75ms for both central and peripheral connections
- scan interval 33.75
- scan window = 2.5ms * (max_number_central_connections - num_active_central_connections), so it varies between 20ms and 0ms
- adv interval 202.5ms (33.75ms * 6)
- I only advertise while there are free slots for peripheral connections
I also have connection event extension enabled and the new improved advertising option enabled
When nothing is connected, everything looks fine
When i establish a peripheral connection, eveything falls to pieces and I'm missing connection events and scan windows. The amount missed events/windows also seems to vary (0 - 3) and I'm not sure why. Sometimes it works as expected, other times it does not. Sometimes it might not work as expected then I'll add another peripheral connection and it might work as expected or might not, same when I disconnect from a peripheral connection
Here is one that works as expected
What's going on here? How can I improve my design to be more reliable
Thanks