nRF5 SDK v13.0.0
Experimental: ATT_MTU Throughput Example
This example requires one of the following SoftDevices: S132, S140

Important: Before you run this example, make sure to program the SoftDevice.

The ATT_MTU Throughput Example shows how different connection parameters influence the throughput performance of BLE connections. The following parameters can be tuned:

The example uses the Experimental: GATT Module. It can be run in different modes and assume either the BLE Central or the BLE Peripheral role.

Testing the example application requires two boards, which are both programmed with the same application. One of the boards must be connected to the computer and will serve as the tester. The other board responds to the requests that are sent by the tester.

When the application starts in tester mode, it uses the following default test configuration:

Parameter Value
ATT_MTU size 247 bytes
Connection interval 7.5 ms
Data length extension (DLE) ON
PHY data rate 2 Ms/s

A menu is printed on UART. Through the menu, you can choose to run the test or configure the connection parameters. During the test, the boards connect with the given parameters. The tester then sends 1 MB of data. After that, it queries how much data was received by the other board.

Setup

You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput

Button assignments - in addition to those defined in BSP BLE Button Assignments:

LED assignments:

Testing

Test the ATT_MTU Throughput Example application by performing the following steps:

  1. Compile and program the application on both test boards.
  2. Keep one of the boards connected to the computer. This board will serve as the tester. The other board will serve as responder. The tester board is assigned a COM port, which is visible in the Device Manager.
  3. Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:
    • Baud rate: 115.200
    • 8 data bits
    • 1 stop bit
    • No parity
    • HW flow control: None
  4. Press Button 4 on the responder to put the application into responder mode. Observe that LED 1 is turned on, indicating that the board is scanning and advertising.
  5. Press Button 3 on the tester to put the application into tester mode. Observe that the default parameter configuration and the menu is printed on UART.
  6. Send '1' to the tester over UART. Make sure to send only the '1' character, no carriage return or new line. Note that some terminals, for example Termite, append such characters by default (in Termite, set "Transmitted text" to "Append nothing" to prevent this).
  7. Observe that the tester's LED 1 turns on, indicating that the board is scanning and advertising.
  8. Observe that LED 1 turns off on both boards, indicating that the boards are connected with the default connection parameters.
  9. Observe that LED 2 turns on on both boards and that the tester prints "Test is ready. Press any key to run." on UART.
  10. Press any key. Observe that LED 3 blinks on both boards and that the tester prints the amount of kilobytes sent on UART.
  11. Observe that LED 4 turns on on both boards when the test is finished. The tester prints the elapsed time, the throughput, and the amount of bytes received by the responder.
  12. Observe that LED 1 turns on on the responder and all LEDs are off on the tester, indicating that the boards have disconnected. The tester prints the current parameter configuration and the menu.
  13. Send '2' to the tester over UART to adjust the test parameters.
  14. Use the menu option to change one or several of the parameters and rerun the test.
  15. Repeat the last two steps and test other parameters. Observe how the throughput changes for different sets of parameters.

Documentation feedback | Developer Zone | Subscribe | Updated