nRF5 SDK v15.0.0
Experimental: BLE Multiperipheral Application
This example requires one of the following SoftDevices: S112, S132, S140

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

The BLE Multiperipheral Application shows how one Peripheral can connect to several Centrals. To demonstrate this, program the example on one device to test several peripheral connections from this single device to several Centrals.

The example implements a Blinky application. It uses the LED Button Service, which is a small custom service that is used to toggle LEDs and receive button statuses from the nRF5 Development board. The BLE Multiperipheral Application uses a single LED Button Service Server and connects to several devices that run an LED Button Service Client.

Setup

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

Button assignments:

LED assignments:

Testing

You can test the example by using an Android device, a development board that runs the BLE Blinky Client Application Example, or nRF Connect.

Test using an Android device

To test the BLE Multiperipheral Application, you must install the nRF Blinky Android app. It is available from Google Play and the nRF Blinky GitHub repository.

Test using one or more central Blinky clients

You can test the multiperipheral example by using the BLE Blinky Client Application Example, which serves as a Central to this peripheral example. After you program the examples onto two different boards, they connect to each other (LED 1 is off, LED 2 is on). You can program more boards with the BLE Blinky Client Application Example, and the board that runs the multiperipheral example will connect to all of them.

Press Button 1 on the board that runs the multiperipheral example and observe that LED 3 lights up on all connected central boards.

For a more detailed description, see the BLE Blinky Client Application Example documentation.

Note that you can also use the BLE Multi-link Example as Central. However, the multi-link example accepts all peripheral connections, so the Peripheral will connect four times to the same Central. As a result, you will see four indications for each event.

Test using nRF Connect

You can also test the application with nRF Connect by performing the following steps:

  1. Compile and program the application. Observe that LED 1 is on. This indicates that the application is advertising.
  2. Connect to the device from nRF Connect (the device is advertising as 'Nordic_Blinky').
  3. Observe that LED 1 is off and LED 2 is on, which indicates that the connection is established.
  4. Observe that the services are shown in the connected device and that you can enable services for the Button Characteristic by clicking the 'Play' button.
  5. Notifications are received on the Button Characteristic (0x1524) when pressing or releasing Button 1.
  6. Write '01' to the LED Characteristic (0x1525) and observe that LED 3 is turned on.
  7. Write '00' to the LED Characteristic (0x1525) and observe that LED 3 is turned off.

Documentation feedback | Developer Zone | Subscribe | Updated