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.
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:
You can test the example by using an Android device, a development board that runs the BLE Blinky Client Application Example, or nRF Connect.
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.
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.
You can also test the application with nRF Connect for Desktop by performing the following steps: