Can bt_nus_send be called multiple times within a single connection interval?

Hello,
If I set the connection interval to 300ms, can I call bt_nus_send multiple times (e.g., every 100ms) within that interval?
Additionally:
How can I check if the FIFO queue is empty (i.e., ready to accept new data without overflow)?
Context:
I'm developing a BLE device that needs to:
Maintain active scanning (cannot use very short connection intervals, e.g., <30ms).
Maximize data throughput using bt_nus_send over an existing connection.
Best regards,
Qianjun Wang
Parents
  • As an aside, following eith's suggestion be aware that if you do not implement such a count or something similar a BLE disconnect followed by a reconnect will silently discard the buffer contents at the time of BLE disconnect (in our experience, may be different with latest Softdevice/IDEs) and those packets discarded will be lost. Tracking received packets allows reloading the buffer and hence BLE transmission.

Reply
  • As an aside, following eith's suggestion be aware that if you do not implement such a count or something similar a BLE disconnect followed by a reconnect will silently discard the buffer contents at the time of BLE disconnect (in our experience, may be different with latest Softdevice/IDEs) and those packets discarded will be lost. Tracking received packets allows reloading the buffer and hence BLE transmission.

Children
No Data
Related