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
- Note
- The BLE Multi-link Peripheral application needs the S110 or S130 SoftDevice to work. Its primary use is to act as helper application to test the BLE Multi-link Central application.
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:
- 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.
- Compile and program the central application onto another board.
- 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.
- 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.
- 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.
- Repeat the last two steps with other connected peripherals and observe the same behavior.