nRF5 SDK for Thread and Zigbee v3.1.0
Testing multiprotocol scenarios

Table of Contents

These testing multiprotocol scenarios are based on the Benchmark Application Example.

In the standard testing scenario described in the Benchmark Application example, all devices are running only Thread or Zigbee protocol. Nordic Multiprotocol solution allows adding a simultaneous BLE operation, in which the device can act both as a Central or a Peripheral device. At any moment, you can use the ble commands to configure and enable Bluetooth Low Energy on the Thread or Zigbee node.

See the following image for the multiprotocol setup that is based on three devices:

All these nodes are running benchmark firmware.

benchmark_three_node_setup.png
Benchmark Multiprotocol setup


Setup

You can find the source code and the makefile in the following folder:

Testing

You can test the following scenarios:

Each of these scenarios is a more advanced version of the previous one.

Testing scenario with BLE advertisement only

If the DUT multiprotocol node is meant just to send BLE advertisements, it is sufficient to use only the DUT and Peer nodes, and run ble adv start on the DUT. This command enables advertising with the default parameters. If you need to configure the advertisement parameters, complete the configuration before the advertising is started. Use commands described in Bluetooth advertising configuration.

To test multiprotocol scenarios for BLE advertisement only:

  1. Prepare two nRF52840 Development Kits.
  2. Flash the SoftDevice to all boards according to the instructions in Running examples.
  3. Program the example by using one of the following options:
    • Default instructions:
      1. Build and flash the example according to the instructions in Building examples.
    • Precompiled hex file:
      1. Run the following commands on all boards to flash the application:
        $ cd <InstallFolder>/examples/multiprotocol/benchmark/thread/hex
        $ nrfjprog -f NRF52 --sectorerase --program nrf52840_xxaa_s140_pca10056.hex
  4. Reset the boards.
  5. Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:
    • Baud rate: 115200
    • 8 data bits
    • 1 stop bit
    • No parity
    • HW flow control: RTS/CTS
  6. Start the DUT and Peer nodes by executing the following commands on the DUT node:
    ble adv info
    ble adv interval 200
    ble adv start

To stop the BLE advertisement, execute the following command on the DUT node:

ble adv stop

Testing scenario with BLE scanning only

If the DUT multiprotocol node is meant just to perform continous BLE scanning, it is sufficient to use only the DUT and Peer nodes, and run ble scan start. This command enables scanning with the default parameters. If you need to configure the scanning parameters, complete the configuration before the scanning is started. Use commands described in Bluetooth scanning configuration.

To test multiprotocol scenarios for BLE scanning only:

  1. Prepare two nRF52840 Development Kits.
  2. Flash the SoftDevice to all boards according to the instructions in Running examples.
  3. Program the example by using one of the following options:
    • Default instructions:
      1. Build and flash the example according to the instructions in Building examples.
    • Precompiled hex file:
      1. Run the following commands on all boards to flash the application:
        $ cd <InstallFolder>/examples/multiprotocol/benchmark/thread/hex
        $ nrfjprog -f NRF52 --sectorerase --program nrf52840_xxaa_s140_pca10056.hex
  4. Reset the boards.
  5. Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:
    • Baud rate: 115200
    • 8 data bits
    • 1 stop bit
    • No parity
    • HW flow control: RTS/CTS
  6. Start the DUT and Peer nodes by executing the following commands on the DUT node:
    ble scan info
    ble scan interval 200
    ble scan start

To stop the BLE scanning and see discovered peripherals, execute the following command on the DUT node:

ble scan stop

Testing scenario with BLE connection (idle)

In case you want to test the BLE connection, use the DUT, Peer, and BLE Central nodes to simulate a more realistic scenario. Similiarly to the advertising mode, the connection parameters are described in the Bluetooth connection configuration.

To test multiprotocol scenarios for BLE advertising and BLE connection:

  1. Prepare three nRF52840 Development Kits.
  2. Complete the steps above from the Testing scenario with BLE advertisement only.
  3. After running the ble adv start command, execute also the following commands on the DUT node:
    test peer discover
    test info
    test configure mode unidirectional
    test configure count 2000
    test configure length 79
    test start
    You will see === Test Finished === results similar to the standard Benchmark Application Example results. The basic configuration with BLE advertising is done and started.
  4. Start the third board.
  5. Establish a BLE connection between the BLE Central device and the DUT device.
    1. On the DUT node, execute the following commands:
      ble conn info
    2. Read the Bluetooth Device Address (bdaddr) reported by the DUT node.
    3. Execute the following commands on the BLE Central:
      ble conn start [bdaddr]
      ble conn info
      The following results appear:
      Bluetooth connection configuration:
      Scan interval: 100 ms
      Scan window: 50 ms
      Slave latency: 0
      Bluetooth Device Address: [BLE Central bdaddr]
      Connected devices: 1
      Bluetooth connected device 0:
      Connection interval: 100
      Bluetooth Device Address: [DUT bdaddr]
      Done

The devices are now in a Bluetooth connection. However, they are in the idle state, and not sending data.

Testing scenario with BLE connection (sending data)

To test multiprotocol scenarios for BLE advertising and BLE connection, with the devices sending data:

  1. Complete the steps from the Testing scenario with BLE connection (idle) section.
  2. Execute the following command on the DUT node:
    test start
    You will see === Test Finished === results similar to the standard Benchmark Application Example results.
  3. Pay attention to the unidirectional throughput value.
  4. Execute the following command on the BLE peripheral to set the flood packet size to 90 bytes of data and enable flood autostart:
    ble flood length 90
    ble flood autostart enable
  5. Start the test again on the DUT device:
    test start
    The BLE connection is now senting data.
  6. Pay attention to the unidirectional throughput value. It decreased as the result of the BLE transfer.

To stop the Bluetooth traffic:

  1. Execute the following command on the BLE peripheral node to stop sending data and end the connection with the DUT node:
    ble conn stop [DUT bdaddr]
  2. Execute the following command on the DUT node to stop advertising:
    ble adv stop

Documentation feedback | Developer Zone | Subscribe | Updated