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

nRF52832 throughput test with Nordic Uart Service

Hi Nordic Tech Support,

        Our company is going to use Nordic nRF52832 on our next generation wireless product. I am the software engineer and doing the evaluation these days. Currently I am working on the throughput test. And I have one question to ask about:

         By default, I am using the throughput example provided by your SDK nRF5_SDK_16.0.0. It is under the examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput.

The test result is OK and matches to the S132_SDS_v7.1_SoftDevice_Specification chapter 17.  infocenter.nordicsemi.com/index.jsp

          Then I want to do the similar test with NUS(Nordic UART Service) demo. I am using two Nordic nRF52832 EVK, one works as Master, the other as Slave. The initial code are using:

examples\ble_central\ble_app_uart_c (master) and examples\ble_peripheral\ble_app_uart(slave). I modified the code to make slave device send 1M bytes notification data to Master, just the same as the ble_app_att_mtu_throughput demo did.  But when I use the NUS demo to test the throughput, no matter what parameters I changed (e.g. ATT MTU Size, Data length, Connection interval,  etc.), My throughput results can not be improved as the ble_app_att_mtu_throughput demo did.

My test results with NUS are : Send 1M bytes notification data will cost almost about 2 min 10 seconds with LE 2M PHY(the same result with "Write Command") , so the throughput is about 8kB/s = 64 kbps.  It is not possible to achieve the typical case in ble_app_att_mtu_throughput demo 256 kbps (ATT MTU = 23, event length = 7.5ms, connection interval = 7.5ms), it is even not possible to achieve much higher throughput of 1327 kbps (ATT MTU = 247, data length = 251, event length = 50 ms, connection interval = 50m).

          Comparing to ble_app_att_mtu_throughput demo , I don't know why the throughput results between two EVKs over NUS would decrease so much, . I searched in the DevZone ,but did not find the clear answer. Some posts said that with NUS service, the throughput can not go over 10kB/s= 80 kps, Is that right? If not, what should I change in the examples\ble_central\ble_app_uart_c  or examples\ble_peripheral\ble_app_uart to improve the throughput to make it match the results tested on examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput.

         Thanks, hope to get your feedback.

Parents
  • Hello,

    There is no reason not to be able to send with just as high throughput with the ble_app_uart and ble_app_uart_c example. However, you need to tune the connection parameters correctly.

    Try to set these settings on both the central and peripheral

    event_length = 500(units), MTU = 247, data_length = 251, connection_interval (min and max) 100ms.

    Then, the next thing you have to do is to send as much data as possible, and count the sent and received bytes. Which device is sending data? Central or Peripheral? How do you queue the packets?

    Another thing is that you need to check the length field of the received packet. If you measure by printing the received packets (over UART), you will not see the same. UART is a fairly slow protocol.

    Test the attached projects. Unzip it so that the path is:

    SDK16.0.0\examples\nus_throughput\ble_app_uart. 

    They will connect, just like the normal ble_app_uart and ble_app_uart_c projects, but you need to press button 4 on either the central or the peripheral for them to start transmitting packets.

    Also, it doesn't use 2MBPS. If you want this, you must enable this, e.g. in the connected event.

    nus_throughput.zip

    I configured the Segger Embedded Studio projects, so if you want to use any other IDE, you may need to adjust some memory settings according to the log.

    Best regards,

    Edvin

Reply
  • Hello,

    There is no reason not to be able to send with just as high throughput with the ble_app_uart and ble_app_uart_c example. However, you need to tune the connection parameters correctly.

    Try to set these settings on both the central and peripheral

    event_length = 500(units), MTU = 247, data_length = 251, connection_interval (min and max) 100ms.

    Then, the next thing you have to do is to send as much data as possible, and count the sent and received bytes. Which device is sending data? Central or Peripheral? How do you queue the packets?

    Another thing is that you need to check the length field of the received packet. If you measure by printing the received packets (over UART), you will not see the same. UART is a fairly slow protocol.

    Test the attached projects. Unzip it so that the path is:

    SDK16.0.0\examples\nus_throughput\ble_app_uart. 

    They will connect, just like the normal ble_app_uart and ble_app_uart_c projects, but you need to press button 4 on either the central or the peripheral for them to start transmitting packets.

    Also, it doesn't use 2MBPS. If you want this, you must enable this, e.g. in the connected event.

    nus_throughput.zip

    I configured the Segger Embedded Studio projects, so if you want to use any other IDE, you may need to adjust some memory settings according to the log.

    Best regards,

    Edvin

Children
No Data
Related