This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Fastest peripheral to central small packet transfer (nRF52)

I am trying to send small data packets of up to 9 bytes at the fastest and most consistent rate from a nRF52 peripheral to a nRF52 Central. Both use the s332 SoftDevices.

What seems to give the best results is:

  1. MIN and MAX CONN INTERVAL SET to 7.5ms in both Central and Peripheral
  2. Calling ble_nus_string_send at a 10ms rate

The above yields transmission packets sent generally less than 25ms apart but sometimes they are > 50ms apart.

I tried waiting for a BLE_EVT_TX_COMPLETE event and then immiedely calling ble_nus_tring_send again the peripheral but when I did the rate was much worse than the above.

Does anyone know the best setup to achieve the fastest and most consistent packet transfer of up to 9 bytes?

Parents
  • You won't get anything much better then Nordic throughput examples I'm afraid. If you care about "latency" then you should go for 7.5ms connection interval (as you did) and simply try to play with throughput and MTU extension parameters to fine the best experimentally. If you group data to longer streams and then cut into packets of MTU-3 size it should be close to "ideal" throughput over GATT, also calling HVX transport each time you have packet ready (whatever timing it is) and simply doing it until you get error code back and then restart the same state machine on TX_COMPLETE event works well for me, hard to say what are you doing differently without seeing the code, debug log from the BLE FW and log from BLE radio...

Reply
  • You won't get anything much better then Nordic throughput examples I'm afraid. If you care about "latency" then you should go for 7.5ms connection interval (as you did) and simply try to play with throughput and MTU extension parameters to fine the best experimentally. If you group data to longer streams and then cut into packets of MTU-3 size it should be close to "ideal" throughput over GATT, also calling HVX transport each time you have packet ready (whatever timing it is) and simply doing it until you get error code back and then restart the same state machine on TX_COMPLETE event works well for me, hard to say what are you doing differently without seeing the code, debug log from the BLE FW and log from BLE radio...

Children
Related