nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRF5340 Max throughput

Hello,

I have a nrf5340dk communicating with nrf52840 dongle connected to a pc with UART baud rate of 2M.

Connection parameters are:

  • 7.5ms Conn interval
  • 1ms Slave latency
  • 247 MTU
  • 251 DLE
  • 2M PHY

nrf5340dk is configured as nus peripheral.

In the code, there is a high priority thread that is in an infinite loop calling bt_nus_send with a 244 byte buffer and here are the results I get when profiling the packets:


Although, in here it suggest I should be getting a ~1.3 Mbps throughput with 400 ms connection interval, but instead I get this:


I wanted to ask, is there something that needs to be additionally done to get the ~1.3 Mbps throughput or is this the limitation of the hardware, and if someone knows why I get less throughput when I set connection interval to 400 ms.

Additional info:

  • NRF Connect SDK: v1.8.0 and v1.9.1 were used, there was no difference between them
  • PC is running Windows 10, communicating via Blatann library
  • nrf5340's antenna is a few centimeters away from nrf52840 usb dongle
Parents
  • Hello,

    The throughput may also be limited by the Central (PC in this case). I made a test based on the peripheral_uart sample to test the same here and I was able to get around 1000 kbps (also limited by central). This test app starts sending notifications with dummy data as soon as soon as the client enables the notifications. It then it prints the measured throughput out on UART.

    Could you try it and see if you get a comparable results? Here is the project I used:

    My setup:

    - Bluetooth low enegery app v3.0.1 in nRF connect for desktop

    - nRF52840 Dongle

    - nRF5340DK

    Result:

    Best regards,

    Vidar

  • Hi Vidar,

    Yes, those are the same results I'm getting on my end.
    Is there a way to get a better throughput with central, without making a custom firmware for the dongle, or is this that can be done with the current official firwmare?

  • Hi,

    You mean you get the same result if you use my FW or if you use the nRF connect app? I am not sure if the blatann script is configured to support long MTU and radio packets which will have a significant impact on the throughput.

    Thanks,

  • The results I get from your app are in the same range as the screenshot I have posted, the troughput is 1110 - 1133 kbps.

    And no, blatann doesn't support long mtu packets, my question is is there something that can be done on the side of the dongle to get the rest of the throughput that has been measured when using two dev boards.

    And do you maybe know why do those meausrements work well with 400 ms connection interval while in this scenario only 7.5 ms inteval gives the best throughput?

  • Sorry, I did not notice the other screenshot. I only saw the one where you got the low throughput @ 400 ms. A likely explanation for this is that the connection event length is too short. The connection event length can be configured when you enable the BLE stack on the dongle.

    I increased the event length to 400 ms at line 141 in this pc-ble-driver-py script:

Reply
  • Sorry, I did not notice the other screenshot. I only saw the one where you got the low throughput @ 400 ms. A likely explanation for this is that the connection event length is too short. The connection event length can be configured when you enable the BLE stack on the dongle.

    I increased the event length to 400 ms at line 141 in this pc-ble-driver-py script:

Children
  • Thank you, that was the reason why the throughput was so slow with 400ms connection interval, this is the result I get after changing the event length:


    There are some weird packet issues for the first 20 seconds of the stream tho.

    I only want to circle back to my previous question, would it be possible to achieve 1.3 Mb/s throughput with the nrf52840 dongle or is this the limit of the hardware/default firmware?

  • Glad to hear that it worked.

    I have not been able to reach 1.3 Mb/s with the pc-ble-driver, and I think it's a combination of overhead of having the serialized softdevice communication and latency introduced by the USB transport. Scheduling of USB events on the PC may be delayed by other OS tasks.

Related