nRF5 SDK v14.0.0
Immediate Alert Application
This example requires one of the following SoftDevices: S132, S140

Important: Before you run this example, make sure to program the SoftDevice.

The Immediate Alert Application is an example that implements the Immediate Alert using the hardware delivered in the nRF5 Development Kit. The Immediate Alert example receives alerts from a peripheral.

The application includes the Immediate Alert Service.

At each power up and disconnect, the Immediate Alert Application will scan for devices advertising the Immediate Alert Service. When an alert is signaled using the Immediate Alert Service, it is indicated using the state BSP_INDICATE_ALERT_0 or BSP_INDICATE_ALERT_3, depending on the value of the Alert Level characteristic.

Note
This application is not power optimized!
  • The device must be in bonded state to change the characteristic in this application. Bonding is performed automatically by the application.
  • The application currently does not support connecting to multiple peripherals. Handling Connection Parameters Update and Pairing/Bonding are not implemented. Once connected, the application does not initiate disconnection but is capable of handling a disconnection event initiated by peer or triggered unexpectedly.
  • Push and hold Button 2 for 5 seconds to erase all bonds and restart scanning.

Setup

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

Testing

Two boards are needed to perform this test:

The application running on the Peripheral board is intended to serve as a peer to this Immediate Alert Central application.

Test the BLE Immediate Alert Example application by performing the following steps:

  1. Compile the Immediate Alert Example application and program both the SoftDevice and the application on the Central board.
  2. On the Central board, observe that the BSP_INDICATE_SCANNING state is indicated. This shows that the application is scanning for Immediate Alert Peripherals.
  3. Compile the Immediate Alert Client application and program both the SoftDevice and the application on the Peripheral board.
  4. Observe that the Immediate Alert Client is advertising.
  5. Once the connection is established, the BSP_INDICATE_CONNECTED state is indicated on both boards.
  6. On the Peripheral board, press Button 1 to signal an alert. By pressing Button 1, you can switch between different Alert Levels (BSP_INDICATE_ALERT_0, BSP_INDICATE_ALERT_3 and BSP_INDICATE_ALERT_OFF). Observe on the Central board that the different Alert Levels are indicated.
  7. Disconnect the devices, for example by pressing the Reset Button on the Central board. Observe that the boards automatically reconnect and that it is again possible to set the Alert Level.

Documentation feedback | Developer Zone | Subscribe | Updated