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