nRF5 SDK v17.1.0
BLE Running Speed and Cadence Collector 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 Running Speed and Cadence Collector application implements the Running Speed and Cadence Collector Role using the S13x SoftDevice.

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

The Running Speed and Cadence Collector application implements the Collector role for the Running Speed and Cadence Profile. It scans peripheral devices, connects to the device advertising with Running Speed and Cadence Service UUID in its advertisement report, and discovers Running Speed and Cadence Service and Device Information Service. The device information is logged on the UART interface right after the service discovery. The application also configures the RSCS to start sending notifications of Running Speed and Cadence measurements. The received measurements are also logged on the UART interface.

The application includes two services from the Running Speed and Cadence profile:

Note
Currently, the application does not support connecting to multiple peripherals. Handling of Connection Parameters Update and of Pairing/Bonding is not implemented. Once connected, the application does not initiate disconnection, but is capable of handling a disconnection event initiated by a peer or triggered unexpectedly.

Setup

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

Button assignments: BSP BLE Button Assignments

The application uses the following UART settings:

Testing

Two boards are needed to perform this test:

The application running on the Sensor board is intended to serve as a peer (i.e. Running Speed and Cadence Sensor role) to this Running Speed and Cadence Collector application.

Test the BLE Running Speed and Cadence Collector Example application by performing the following steps:

  1. Compile the BLE Running Speed and Cadence Collector Example application and program both the SoftDevice and the application on the Collector board.
  2. On the Collector board, observe that the BSP_INDICATE_SCANNING state is indicated. This shows that the application is scanning for Running Speed and Cadence Sensors.
  3. Compile the Running Speed and Cadence Sensor application and program both the SoftDevice and the application on the Sensor board.
  4. Observe that the Running Speed and Cadence Sensor is advertising.
  5. Once the connection is established, the BSP_INDICATE_CONNECTED state is indicated on the Collector board.
  6. After a few seconds, observe Device Information displayed on UART.
  7. Observe Running Speed and Cadence measurements displayed periodically on UART.
  8. Disconnect the devices, for example by pressing the Reset button on the Collector board. Observe that the boards automatically reconnect and that similar logs are displayed on UART.

Documentation feedback | Developer Zone | Subscribe | Updated