Hi, we are developing an Application with one nrf52840 acting as central, that is connected to up to three nrf52840 acting as peripheral. For our Project, latency for transmissions from peripheral to central is essential. Thus, we have set the connection interval for all 3 Peripherals to the minimum of 7,5 ms. For data transfer we use the Nordic UART Service (NUS).
We are currently facing a problem: If we call ble_nus_data_send (which then calls sd_ble_gatts_hvx) on peripheral side, while there is already one notification queued to be sent, it will take 2 connection intervals to transmit both notifications. I would expect both notifications to be sent in one connection interval, as long as the total amount of bytes to be transferred, fit according to NRF_SDH_BLE_GAP_EVENT_LENGTH and NRF_SDH_BLE_GAP_DATA_LENGTH. Is there a way to achieve that both notifications are sent in one connection interval?
Our Connection Parameters:
NRF_SDH_BLE_GAP_EVENT_LENGTH = 2 (this is needed so that 3 connections fit in one connection interval)
NRF_SDH_BLE_GAP_DATA_LENGTH = 78
NRF_SDH_BLE_GATT_MAX_MTU_SIZE = 140
NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL = 6
We transmit 14 bytes per notification. So I would expect at least two notifications to fit in one connection interval. In addition, when we pass more than 19 bytes to ble_nus_data_send, it takes 2 connection intervals to transmit the notification. I would expect it to be transmitted in one connection interval, as long as the payload size does not exceed NRF_SDH_BLE_GAP_DATA_LENGTH.
Thank you and best regards.
Björn