I have an nrRF52832 central connecting to 16 (nordic-based) peripherals. We allow up to 20 connections on this design, but only 16 are currently connected during this test.
We are trying to find out why messages are not getting through in the timeframe we expect, so I enabled a gpio toggle on the BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event.
We are seeing this event triggered 20 times for every packet that goes out. Is that normal?
Additionally, we are using the following settings on the central
#define SCAN_INTERVAL MSEC_TO_UNITS(200, UNIT_0_625_MS) /**< Determines scan interval in units of 0.625 millisecond. */
#define SCAN_WINDOW MSEC_TO_UNITS(5, UNIT_0_625_MS) /**< Determines scan window in units of 0.625 millisecond. */
#define SCAN_TIMEOUT 0 /**< Timout when scanning. 0x0000 disables timeout. */
#define CONNECT_SCAN_TIMEOUT 1 // 1s /**< Timout when scanning for connect. */
#define MIN_CONNECTION_INTERVAL MSEC_TO_UNITS(55, UNIT_1_25_MS) /**< Determines minimum connection interval in milliseconds. */
#define MAX_CONNECTION_INTERVAL MSEC_TO_UNITS(55, UNIT_1_25_MS) /**< Determines maximum connection interval in milliseconds. */
#define SLAVE_LATENCY 0 /**< Determines slave latency in terms of connection events. */
#define SUPERVISION_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS) /**< Determines supervision time-out in units of 10 milliseconds. */
#define NRF_SDH_BLE_GAP_EVENT_LENGTH 2
#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23
With these settings, we are seeing that packets sometimes take 250ms to be transmitted even though the connection interval is 55ms.
Any idea why this might be?