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

How can I change the TX_BUFFERS on both nrf51 and nrf52?

HI, I get the information frome the sd_ble_tx_buffer_count_get that ,the nrf51 with S110 SD8.0 has 7 count(7*32BYTES) of TX_buffers (I can use 6cnt one time) . The nrf52 with SDK 0.9.2 SDs132_nrf52_2.0.0-4.alpha_softdevice has 3 TX_buffers(2 count can i used).

I want to know that


1. How can I change the tx_buffers size ,or how can I keep the txbuffers always have some data in there?    I have tested the BLE_EVT_TX_COMPLETE event to send data as fast as I can ,that is not fast enough.


  • Please edit your question and remove question 2-5 and add them as separate questions, or this will quickly get very messy. In regards to question 1. What kind of throughput are you seeing? What throughput do you require?

  • I see that, every interval i can put no more than 2 count of packs into txbuffers the message sequence below is in one interval that shows what's I test the nrf52 works

    |--------master--------------------------------------slave-NRF52----------|

    |#1LL_DATA_PUD------------------->>>>>>>>>>>>>>>>SD------------|

    |------------------------150us-------------------------------------------------|

    |#2 <<<<<<------------------------------------LL_DATA PDU (pack 1)| (1 packs keep)

    |------------------------150us-------------------------------------------------|

    |#3LL_DATA_PUD------------------->>>>>>>>>>>>>>>>SD------------|

    |------------------------150us-------------------------------------------------|

    |#4 <<<<<<-------------------- LL_DATA PDU (pack 2) (no packs keep)

    |#5 no more data so no more LL_data_pud(empty or not) frome the master end this interval.

    I think the BLE_EVT_TX_COMPLETE is become frome #2 and #4

    what's I want is that I want to put one pack between #2 to #4 then I can keep the txbuffer always has packs. and then the #5 will not stop to send LL_data_pud.(the stack of the master is all under my control no matter the LL or BB)

    or if the rf txbuffer is more than 10*32BYTES it will works too .

  • Currently the tx buffer size is fixed, but soon you will be able to set the size when you enable the SoftDevice.

    As a peripheral and server, the maximum throughput you can achieve is 42.6 kbps, by using notifications. This is with 20 bytes in each packet, 2 packets per connection interval, and 7.5 ms connection interval. This is only achieveable if the central device supports 7.5 ms connection interval and 2 packets per connection interval.

    You achieve the maximum throughput by calling sd_ble_gatts_hvx() in a loop until it returns BLE_ERROR_NO_TX_BUFFERS. And restart this loop every time you get BLE_EVT_TX_COMPLETE.

  • Regarding configuring the number of tx buffers, has "soon" arrived yet (e.g., as of SDK 14.2, S132 v5.1)? What is needed to configure that?

    Is it possible to send more than 2 packets per connection interval? I've done this in the past with a competing BLE solution, so I hope that the nRF52 can do it.

  • Soon has arrived.

    The most important thing to configure is the event length. To utilize the complete connection interval set the event length equal to it. 9 packets with a 20 byte payload should be possible with a 7.5 ms connection interval (nRF52<->nRF52).

    Also be aware that you can increase the ATT MTU and link layer payload to send bigger packets over the air.

Related