nRF51 SDK - S130 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Health Thermometer Application

The Health Thermometer Application is an example that implements the Health Thermometer profile using the hardware delivered in the nRF51 Development Kit.

The application includes the two services in the Health Thermometer profile:

In addition, use of the Battery Service is also demonstrated. When the application starts, a timer for generating battery measurements is started.

When indication of the Temperature Measurement characteristic is enabled, a Temperature Measurement is transmitted. This also happens when reconnecting to a previously bonded central. A Temperature Measurement is also transmitted each time button 1 is pushed.

Note
This application is not power optimized!
The application will stop advertising after 3 minutes and go to system-off mode. Push button 1 to wake it up and restart advertising.

Setup

The name of the example is ble_app_hts_s130_pca10028. If you are not using the Keil Pack Installer, you can find the source code and project file of the example in the following folder: <InstallFolder>\examples\ble_peripheral\ble_app_hts

Button assignments - in addition to those defined in BSP BLE Button Assignments:

  • During Connection:
    • Button 1: Simulate and send a Temperature Measurement.

Testing

Test the Health Thermometer Application with the nRF Toolbox app, which is available on both iOS (Apple Store) and Android (Google Play).

You can also test the application with the Master Control Panel by performing the following steps:

  1. Compile and program the application. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
  2. Connect to the device from Master Control Panel (the device will be advertising as 'Nordic_HTS'), then bond and perform service discovery. Observe that the BSP_INDICATE_CONNECTED state is indicated.
  3. Click the 'Enable services' button on the Master Control Panel. Observe that one Temperature Measurement indication is received. Also, Battery Level notifications are received every two seconds.
  4. Click the 'Disconnect' button and then the 'Connect' button on the Master Control Panel. Observe that one Temperature Measurement indication is received.
  5. Push Button 1. Observe that one Temperature Measurement indication is received each time the button is pushed.