nRF5 SDK v15.0.0
GATT Service Client Example 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 GATT Service Application is an example that implements the GATT service using the hardware delivered in the nRF5 Development Kit. The GATT Service client example subscribes to indications from the Service Changed Characteristic (0x2A05).

For more information about using the GATT Service client implementation, see GATT Service Client.

This example can be tested together with GATT Service Server Example Application.

Note
This application is not power optimized!

Setup

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

Testing

  1. Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:
    • Baud rate: 115.200
    • 8 data bits
    • 1 stop bit
    • No parity
    • HW flow control: None
  2. Compile and program the application. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
  3. Program the GATT Service Server Example Application onto a second device. Observe that the BSP_INDICATE_CONNECTED state is indicated once both devices are running.
  4. Trigger a service change on the connected peer device in order to send a Service Changed indication to your device.
  5. Observe the UART output that verifies that the Service Changed indication was received.

Documentation feedback | Developer Zone | Subscribe | Updated