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

nRF51822 BLE_ERROR_NO_TX_BUFFERS issue

I'm using the nRF51822 DK + SDK10.0.0 + s110. I modified the app_ble_hrs example to send 2x 20B packets of data (via a modified heart_rate_meas_send() function) upon a m_battery_timer_id timeout (the other timers are disabled). My goal is to reach 40B (2x 20B packets) every 6ms. The client is a 2013 Asus Nexus 7 which allows 3-4 packets per connection event @ 7.5ms connection intervals. I'm using sd_ble_tx_buffer_count_get() and BLE_EVT_TX_COMPLETE evt.count to keep track of the availble TX buffers per the doc.

I'm seeing really poor performance in that at data intervals of <15ms, I quickly reach 0 available buffers). 15ms for 40B is only 21kbps. Even at 15ms data intervals or higher I see the number of TX buffers available slowly drop over time (starting off at 7 buffers). I'm running it now at 20ms data intervals and the number of TX buffers was 4 after 20 minutes and has now actually started missing data after 30 minutes and has only 2 TX buffers available :( . I also noticed that this calculation of available buffers does not necessarily match the number of buffers really available, since the counter that I decrement in heart_rate_meas_send() may decrement more than the total number of TX buffers without BLE_ERROR_NO_TX_BUFFERS being triggered.

Any help is appreciated! Would an nRF52 help with this issue?

Parents
  • Hi Stefan, I was able to use a Frontline BPA LE sniffer to show that the expected payload datarate of 53kbps was actually 64kbps when connected to the Android client. I tried a different client and the datarate was 56kbps. Hence I believe there is some issue with one of the clients causing excessive retransmissions and hence occasionally maxing out the internal TX buffers on the nRF51, causing the missed data. Does the nRF sniffer/Wireshark show payload datarate? I tried it but it doesn't seem to work well compared to TI's CC2540 based packet sniffer.

Reply
  • Hi Stefan, I was able to use a Frontline BPA LE sniffer to show that the expected payload datarate of 53kbps was actually 64kbps when connected to the Android client. I tried a different client and the datarate was 56kbps. Hence I believe there is some issue with one of the clients causing excessive retransmissions and hence occasionally maxing out the internal TX buffers on the nRF51, causing the missed data. Does the nRF sniffer/Wireshark show payload datarate? I tried it but it doesn't seem to work well compared to TI's CC2540 based packet sniffer.

Children
Related