nRF51 SDK - S130 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
BLE Multi-link Example

The BLE Multi-link Central application together with the BLE Multi-link Peripheral application tests the multi-link functionality of the S120 and S130 SoftDevice. The BLE Multi-link Example demonstrates how one central device can connect to multiple peripheral devices.

On startup, the peripheral devices will start advertising. Once connected to the central, pressing button 1 on the peripheral changes the state of the peripheral and a corresponding LED on the central. When multiple peripherals are connected, each peripheral is assigned one LED by the central depending on the order in which the peripherals got connected. For example, LED 1 will be assigned to the peripheral that connects first. LED 2 will be assigned to the peripheral that connects second and so on.

Setup

BLE Multi-link Central (choose if you want to run the example with an S120 or an S130 SoftDevice):

  • S120: The name of the example for PCA10028 is ble_app_multilink_central_s120_pca10028, and for PCA10031 it is ble_app_multilink_central_s120_pca10031. If you are not using the Keil Pack Installer, you can find the source code and project file of the example in the following folder: <InstallFolder>\examples\ble_central\ble_app_multilink_central
  • S130: The name of the example for PCA10028 is ble_app_multilink_central_s130_pca10028, and for PCA10031 it is ble_app_multilink_central_s130_pca10031. If you are not using the Keil Pack Installer, you can find the source code and project file of the example in the following folder: <InstallFolder>\examples\ble_central\ble_app_multilink_central

BLE Multi-link Peripheral(choose if you want to run the example with an S110 or an S130 SoftDevice):

  • S110: The name of the example is ble_app_multilink_peripheral_s110_pca10028. If you are not using the Keil Pack Installer, you can find the source code and project file of the example in the following folder: <InstallFolder>\examples\ble_central\ble_app_multilink_peripheral
  • S130: The name of the example is ble_app_multilink_peripheral_s130_pca10028. If you are not using the Keil Pack Installer, you can find the source code and project file of the example in the following folder: <InstallFolder>\examples\ble_central\ble_app_multilink_peripheral

The BLE Multi-link Example requires at least three boards to verify that more than one link is active. The central device can have a maximum of 8 concurrent connections to peripheral devices.

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

UART logging can be used instead of the LEDs.

Testing

Test the BLE Multi-link Example application by performing the following steps:

  1. Compile and program the peripheral application to two boards. The BSP_INDICATE_ADVERTISING state is indicated on both boards. This means they are advertising and are waiting for the central device to connect.
  2. Compile and program the central application onto another board.
  3. As soon as the central application is programmed, it starts scanning and attempts to connect to the peripherals and enable notifications. Hence on the peripherals, observe that the BSP_INDICATE_CONNECTED state is indicated after a few seconds.
  4. Press button 1 on one of the peripherals. Observe that BSP_INDICATE_ALERT_3 is indicated on that peripheral and one of the LEDs on the central turns ON.
  5. Press button 1 on the same peripheral again. Observe that BSP_INDICATE_ALERT_OFF is indicated and the corresponding LED on the central is turned off.
  6. Repeat the last two steps with other connected peripherals and observe the same behavior.