I am trying to solve a latency issue. My system consists of a central and 20 connected peripherals (all based on Nordic parts). I have allocated the following:
Scan Interval: 200ms
Scan Window: 5ms
Connection Interval Min/Max: 55ms
Gap Event Length: 2.5ms (2)
In the first logic analyzer trace, you can see the following:
Send Dimmer - Loads 16 tx packets into the queue using sd_ble_gattc_write
You can see the radio notifications occurring (16 per 55ms connection interval).
The data on 02_WRITE_RSP is the BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event, signifying that the data was sent on the air.
You can see that in this case, a message took 5 connection intervals to be transferred! Why? Could there really be that much interference?
In the second logic analyzer trace, you can see the scan interval come into play. It looks like the scan interval just wipes out the peripheral connections that it overlaps with.
I believe the documentation states this, but is there a way to ensure that the scan window always occurs in an empty spot of the interval? I specifically chose my parameters so that all the events could occur within the connection interval (20 * 2.5ms periphals + 5ms scan window = 55ms connection interval).