nRF5 SDK v15.0.0
Immediate Alert Client 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 Immediate Alert Client Application is an example that implements the Immediate Alert using the hardware delivered in the nRF5 Development Kit. The Immediate Alert Client example sends alerts to the remote device (for example, a smartphone).

The application includes the Immediate Alert Service Client.

At each power up and disconnect, the Immediate Alert Client Application will perform 3 minutes of fast advertising without whitelist, which is indicated by the BSP_INDICATE_ADVERTISING state. It will then switch to sleep mode, and the state BSP_INDICATE_IDLE is indicated. When an alert is signaled using the Immediate Alert Service Client, it is indicated on the remote device by changing the value of the Alert Level characteristic.

Note
  • This application is not power optimized!
  • The application will stop advertising and go to system-off mode after 3 minutes and 30 seconds (if no advertising with whitelist was done) or after 4 minutes (if advertising with whitelist was done). Press Button 1 to restart advertising, or hold Button 2 for 5 seconds to erase all bonds and restart advertising.

Setup

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

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

Testing

Test the Find Me locator (Immediate Alert Service Client) functionality by performing the following steps:

  1. In nRF Connect, create the Immediate Alert Service (IAS) server by performing the following steps:
    • In Server Setup, click the settings button and select "Load setup".
    • In the resulting window, navigate to the <InstallFolder>\examples\ble_peripheral\experimental\ble_app_ias_c folder. Load the file findMeMasterServer.ncs.
    • Click "Apply to device" and navigate back to Connection Map.
  2. Connect to the device.
  3. Press Button 1 and observe that the Alert Level value at the server in nRF Connect changes to 01. This indicates that the device was able to signal a Mild Alert to the Central.
  4. Press Button 1 again and observe that the Alert Level value at the server in nRF Connect changes to 02. This indicates that the device was able to signal a High Alert to the Central.
  5. Press Button 1 again and observe that the Alert Level value changes to 00. This indicates that the device was able to clear the Alert previously signalled to the Central.

You can also test the Immediate Alert Service Client by using the Immediate Alert Server Application as a Central.


Documentation feedback | Developer Zone | Subscribe | Updated