Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how many packets per connection interval 52832

I'm using 52832/S132 V2/SDK11. For the test I only send notification to central just to see how many I can send in each interval. I keep calling sd_ble_gatts_hvx() until I get BLE_ERROR_NO_TX_PACKETS.

What I found is if I send only 4 bytes each time, I can call sd_ble_gatts_hvx() 13 times before I get BLE_ERROR_NO_TX_PACKETS. By my application time stamp, I can see I get TX_COMPLETE for the first 8 notification in first interval, then next 4 in second interval, then last TX_COMPLETE for last notification in third interval. The interval is about 25ms. The central I connect to is an iPhone. Clearly someone (likely soft device) is doing some buffering. I wonder if there's any doc explain this? Is it in soft device spec?

I also tried increasing data size to 20bytes for notification. In such case I can only call sd_ble_gatts_hvx() 7 times. My logging shows the first 6 gets transmitted in first interval (I got 6 TX_COMPLETE), then the 7th in second interval. So 6 is the max number of packets OTA for each interval?

Thanks for any info!

Parents
  • Looking at my own performance numbers, the NRF52832 seems to be fast enough that you can queue new TX packets during a connection event. But that depends a lot on how fast your feeding code is - I used a rather large (KB sized) FIFO.

    Note that the central may also limit the amount of data transferred in one interval. Note that Apple says the connection interval should be 30ms.

Reply
  • Looking at my own performance numbers, the NRF52832 seems to be fast enough that you can queue new TX packets during a connection event. But that depends a lot on how fast your feeding code is - I used a rather large (KB sized) FIFO.

    Note that the central may also limit the amount of data transferred in one interval. Note that Apple says the connection interval should be 30ms.

Children
Related