ABSTRACT — Bluetooth is a wireless technology used in many applications with newer versions coming out every year to meet the needs of users. The newest version contains the best improvements to date. The improvements mainly relate to the high speed LE 2M physical layer data rate and LE long-range transmission. This document will focus on throughput testing and analyze different parameter settings that cause different throughput results.
I – Introduction
We use 2 Nordic nRF52840-DK boards to do throughput testing. One of the boards acts as a central (master) and another acts as a peripheral (slave). First, we give an overview of the BLE connection procedure. Second, we talk about the GATT (Generic Attribute Profile) protocol factors, ATT_MTU, data length extension and connection interval. Making experiment to see how these factors affect the throughput. Finally, based on these experiments, we show how to optimize for maximum data throughput in BLE 5.
II – BLE Stack and Frequency Channels
SoftDevice S140 is a feature complete Bluetooth 5 qualified protocol stack for the nRF52840 SoC. The S140 SoftDevice is a Bluetooth Low Energy Central and Peripheral protocol stack solution. The S140 SoftDevice integrates a Bluetooth Low Energy controller and host and provides a flexible API for building Bluetooth Low Energy nRF52X SoC solutions. The development and experiment are based on nRF5_SDK V15.3.0.
BLE uses channels 0-36 for data transmission (light orange in picture below) while channel 37, 38 and 39 are used as advertising channels (pink in picture below).
III – BLE Connection Procedure
If central finds the peripheral with a specific name, it will send a connection request to the peripheral. After they are connected, the GATT client and server will exchange parameters including ATT_MTU, Data Length Extension and PHY rate.
IV – GATT Parameters Setting
The Attribute Maximum Transmission Unit (ATT_MTU) defines the amount of data a device can send/receive per GATT operation. The default MTU is 23 bytes and can be increased to 247 bytes. When increasing this value, longer payloads can be achieved by sending several packets in one transaction. In order to maximize the use of the Data Length Extension, the MTU should always be set to (Maximum Data Length – 4). This means that for the maximum data length of 251, the optimum MTU to set is 247 bytes.
Data Length Extension (DLE):
The data length extension feature allows the LE controller to send packet data units (PDUs) with payloads of up to 251 bytes. Data length extension uses larger packets so that more data can be sent in one packet, increasing throughput. The nRF52840 supports the increase of the data packet length from the default 27 to the maximum value allowed by the Bluetooth spec which is 251 bytes.
Physical layer (PHY) data rate:
The over-the-air data rate used to be limited to 1Mbps in BLE. However, Bluetooth 5 has higher data rates to achieve faster transmission and uses coded PHY for long range transmissions.
A BLE connection interval is the time between two data transfer events (connection events) between the central and the peripheral device. When increasing this value, more packets may be sent in one interval but if a packet is lost, the wait until the re-transmission is longer. Increasing this value can increase throughput, provided that the GAP event length increases by the same amount or the connection event length extension is enabled.
V – Throughput Test
Test case-1: Different PHY rate
Increasing PHY rate results in throughput improvement.
Test case-2: Different ATT_MTU
Increasing ATT_MTU results in throughput improvement.
Test case-3: DLE enable/disable
Enable Data Length Extension (DLE) will increase throughput.
Test case-4: Different connection interval
Increasing connection interval result in throughput improvement.
Test case-5: Different connection interval—one device (client) is shaded partially to simulate the packets lost.
This test case aims to simulate the length of time between packet loss and re-transmission. This delay will cause slower throughput. When the value of connection interval is longer, the throughput is worse. The level to set the connection interval depends on the packet loss and the environmental effect.
Optimizing for maximum data throughput
Always enable DLE
– If you’re using Bluetooth v4.1 or earlier, this is not a valid option.
Use LE 2M PHY
– If you know that the devices on both ends support BLE 5, choosing the LE 2M PHY is one of the best ways to maximize your application data throughput.
Use maximum ATT MTU value 247 bytes.
Connection interval parameter depends on the testing environment. Chose maximum interval time if there is no packet loss.