nRF5 SDK v17.0.2
BLE Blinky Client Application Example
This example requires one of the following SoftDevices: S132, S140

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

The BLE Blinky Client Application Example uses the LED Button Service Client. This is a small custom service that is used to read the state of a button from the nRF5 Development board, and to set the state of a LED. The Blinky Client meant to be used together with BLE Blinky Application that uses the server implementation LED Button Service Server.

GAP role implemented is the Central role. GATT role implemented is the Client role.

The Blinky Client will scan for a device with the name "Nordic_Blinky" and connect to it. (This is the name of the complementary example BLE Blinky Application.) Once connected, a service disovery is performed to identify the handles of the Characteristics on the server. The Blinky Client will then Configure the CCCD of the Button characteristic (0x1524) to receive notifications from it. Whenever a Button notification is received, we trigger LED1 on the Blinky Client board to reflect the status of the button press. By pressing Button 1 on the Blinky Client board, we send a value to the LED characteristic (0x1525). This will trigger LED1 on the Blinky Server board to reflect the status of our button.

Setup

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

Button Assignment:

LED assignments:

The application uses the following UART settings:

Testing

Two boards are needed to perform this test:

Test the BLE Blinky Client Example application by performing the following steps:

  1. Compile the BLE Blinky Client Example application and program both SoftDevice and application on the Client board.
  2. On the Client board, observe that LED 1 is on. This shows that the application is scanning for a a Blinky Server.
  3. Compile the BLE blinky Server Example application and program both SoftDevice and application on the Server board.
  4. Observe that the two boards connect to each other (LED 1 will go off, LED 2 will go on).
  5. Press Button 1 on the Client board and Observe that LED 3 on the Server board is on for the duration of the press.
  6. Press Button 1 on the Server board and Observe that LED 3 on the Client board is on for the duration of the press.
  7. Disconnect the devices, for example by pressing the Reset Button on the Client board. Observe that the boards automatically reconnect and repeat steps 5 and 6.

Documentation feedback | Developer Zone | Subscribe | Updated