"Unable to allocate TX context" at the beginning of a stream

Hi,

In my system I have a timer that ticks at 1kHz frequency, collects some data and sends it over BLE via bt_nus_send. It works fine, but in the beginning of the stream for the first few messages I get the following in the debug log:

[00:00:16.970,672] <err> bt_conn: Unable to allocate TX context
[00:00:16.970,672] <wrn> ble_bsp: Failed to send data over BLE connection. bt_nus_send return value = -105
[00:00:16.972,656] <err> bt_conn: Unable to allocate TX context
[00:00:16.972,686] <wrn> ble_bsp: Failed to send data over BLE connection. bt_nus_send return value = -105
[00:00:16.973,663] <err> bt_conn: Unable to allocate TX context
[00:00:16.973,663] <wrn> ble_bsp: Failed to send data over BLE connection. bt_nus_send return value = -105
[00:00:16.975,860] <err> bt_conn: Unable to allocate TX context
[00:00:16.975,860] <wrn> ble_bsp: Failed to send data over BLE connection. bt_nus_send return value = -105
[00:00:16.983,093] <err> bt_conn: Unable to allocate TX context
[00:00:16.983,123] <wrn> ble_bsp: Failed to send data over BLE connection. bt_nus_send return value = -105
[00:00:21.978,057] <wrn> bt_att: Not connected
[00:00:21.978,088] <wrn> ble_bsp: Failed to send data over BLE connection. bt_nus_send return value = -128
[00:00:21.978,302] <wrn> bt_att: Not connected
[00:00:21.978,302] <wrn> ble_bsp: Failed to send data over BLE connection. bt_nus_send return value = -22

After those few drops, it works fine.

My question is, is there any concrete explanation to why this is the case?

Additional info:

  • NRF Connect SDK: v1.8.0 and v1.9.1 were used, there was no difference between them
  • nrf52840 dongle is used to communicate with nrf5340 dev board, where the dongle is central and nrf5340dk is a nus peripheral
  • PC is running Windows 10, communicating via Blatann library
  • nrf5340's antenna is a few centimeters away from nrf52840 USB dongle

Connection parameters:

  • 7.5ms Conn interval
  • 1ms Slave latency
  • 247 MTU
  • 251 DLE
  • 2M PHY
Parents Reply Children
No Data
Related