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

nRF5340PDK Throughput example, very low throughput.

Hi! 

I was trying the throughput example using two nRF5340PDK boards and I observed the throughput is very low, i.e. 1kpbs. I tried programming the cpuappns, but it didn't work correctly, it displayed other stuff on the terminal emulator:

 

And when I tried programming on the cpuapp, the throughput was 1kbps:

I tried modifying the .conf files, by adding the lines:

CONFIG_BT_CTLR_TX_BUFFER_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_RX_BUF_LEN=255

But the throughput stayed the same.

 Why would the Bluetooth be so slow? What should I do to maximize the throughput?

Thank you,

Florin Mazilu.

  • Hi Florin

    When running Bluetooth examples on the nRF5340 application core, the network core will be automatically flashed with the hci_rpmsg example, and it is actually for this example you need to change the Bluetooth configuration. 

    In other words you need to change the prj.conf file in the \zephyr\samples\bluetooth\hci_rpmsg folder, and then rebuild your nRF53 project. 

    Can you give this a go and see if it fixes the throughput issue?

    Best regards
    Torbjørn

  • Hi Torbjørn

    I added those lines to prj.conf from the hci_rpmsg folder, but now I get an error when I build the solution:

    If I remove those three lines the solution builds without errors.

    Thank you,

    Florin.

  • Hi Florin

    Thanks for the report. I tried it myself and see the same issue, apparently the network core runs out of memory when applying this configuration. 

    I will have to discuss this with the developers and get back to you next week. 

    Best regards
    Torbjørn

  • Hi Florin

    If you change the CONFIG_BT_MAX_CONN parameter from 16 to 4 it should reduce the memory consumption of the example, and ensure that it builds successfully. 

    Please give this a go, and let me know whether or not it works for you. 

    Best regards
    Torbjørn

  • Hi

    Thank you for your response! 

    I tried this and the solution built and ran successfully, but the throughput is very low; i.e. 1kbps for connection interval of 320 units and 76kbps for connection interval of 6 units.

    So I tried using the nRF connect app for Android and there I could see the timestamp of each packet received and the contents of the data, with or without the three lines added to the network sample the data length was still the same 244 (see picture below, from 0x00 to 0xF3; I added these values to see the length of the packet). 

    The picture above is for connection interval of 320 units. As you can see on the timestamp, the first packet was received at 15:35:22.777 and the second one at 15:35:24.376; almost 2 seconds apart. When the connection interval is 6 units the difference between two consecutive packets is much smaller between 20ms and 30ms and the throughput is 76kbps.

    Also when I reset the board and the Zephyr OS is booting I get a warning on the terminal emulator.

    Regards,

    Florin.

Related