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 Experimental: GATT Service Client.
This example can be tested together with Experimental: 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\experimental\ble_app_gatts_c
Testing
- 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
- Compile and program the application. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
- Program the Experimental: GATT Service Server Example Application onto a second device. Observe that the BSP_INDICATE_CONNECTED state is indicated once both devices are running.
- Trigger a service change on the connected peer device in order to send a Service Changed indication to your device.
- Observe the UART output that verifies that the Service Changed indication was received.