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

How do I calculate throughput for a BLE link?

How can I calculate the maximum throughput for an application running on the nRF51822 and the S110, when connecting to different kind of Central devices?

  • There are primarily 3 factors that determine maximum throughput with BLE:

    • operation type,
    • connection interval, and
    • number of packets transmitted per connection event.

    Operation For high-throughput applications, you should make sure to use either Write Commands (Write without response) or Notification. In each such Write Command or Notification, you can have 20 B data. These packets are link-level ACK-ed, but does not provide any application level ACK-ing, and can hence be queued. If you instead use Write Requests or Indications, you can by spec not queue packets and must wait for an ACK to the first packet before sending the next. This significantly reduces throughput (perhaps 10-fold).

    Connection interval Both the nRF8001 and the nRF51822 supports the lowest connection interval allowed by spec, 7.5 ms. This is also supported by some Android devices, while others does not seem to allow intervals below 37.5 ms. The latest versions of iOS seems to have 30 ms as the lowest documented interval supported.

    Number of packets per event With regard to number of packets per connection event, the nRF8001 will be able to receive 2-3 but can transmit only 1. The nRF51822 on the other hand can both send or transmit up to 6 packets per interval. It seems that most Android devices supports ~4 packets per interval, while most iOS devices supports up to 6 packets.

    Calculation As you can see from the above, throughput with BLE isn't quite straightforward, but given a number of packets per interval n and a connection interval T, the maxiumum throughput can be calculated like this:

    n * 20 B * 1/T

    Some examples:

    • iPhone 5/6 + IOS 8.0/8.1 with nRF51822: 6 * 20 B * 1/0.030 s = 4 kB/s = 32 kbps
    • iPhone 5/6 + IOS 8.2/8.3 with nRF51822: 3 * 20 B * 1/0.030 s = 4 kB/s = 16 kbps
    • iPhone 5/6 + IOS 8.x with nRF8001: 1 * 20 B * 1/0.030 s = 0.67 kB/s = 5.3 kbps
    • Nexus 4 with nRF51822: 4 * 20 B * 1/0.0075 s = 10.6 kB/s = 84 kbps
    • Master Emulator Firmware (MEFW) with nRF51822 0.9.0: 1 * 20 B 1/0.0075 = 2.67 kB/s = 21.33 kbps
    • Master Emulator Firmware (MEFW) with nRF51822 0.11.0: 6 * 20 B 1/0.0075 = 16 kB/s = 128 kbps

    How to receive BLE packets via nRF51822/nRF51422 and Master Emulator Firmware is described in this tutorial, section "Using the nRF51 Dongle". Further discussion on BLE throughput test is on this thread. Also different BLE packet types heavily influence the maximum throughput, as described in this blog.

  • Hi, I'm still confused about few things.

    How can I calculate the maximum throughput for a ble link between peripheral and central device ? I'm sending a packet (20bytes = 160 bits) every 40ms until send a total of 1000 packets.

    R = (160*1000)/40s = 4000bps => 3.9kbps

    That is a correct way for calculate throughput for ble ?? and the max and min connection interval ? at this moment my parameters are:

    DEFAULT_DESIRED_MIN_CONN_INTERVAL 32; // 40ms

    DEFAULT_DESIRED_MAX_CONN_INTERVAL 64; //80ms

    How do these values ​​interfere with my calculations? I dont understand your examples because my propose is calculate throughput after sending 1000 packets.

    Thank you for everyone and please, help me :)

    Regards

  • As stated above, the throughput is dependent on the connection interval, and you can take a look at this question for an explanation of connection parameters: https://devzone.nordicsemi.com/index.php/what-is-connection-parameters

    If you want to transfer data every 40 ms, you should use a connection interval of 40 ms. For a link with a connection interval of 40 ms, max throughput will be 6 * 20 B * 1/(0.040 s) = 3 kB/s if your devices are capable of transferring six packet per interval and 1 * 20 B * 1/(0.040 s) = 0.5 kB/s if you transfer one packets per interval.

  • Hi Ole Morten,

    thanks for the quick response.

    But how do I know how many packets can I send per interval ?

    And i want calculate throughput after receiving 1000 packets, so i have to consider this value in calculations right ? total time would be 40seconds and not 40ms...

    thanks a lot again, but I want to make sure my calculations are correct :\

Related