nRF5 SDK v17.1.0
Multiprotocol Application
This example requires one of the following SoftDevices: S132, S140

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

The Multiprotocol Application is an example that implements the Heart Rate profile in Bluetooth mode and the Gazell device mode.

When the application starts, it is in Bluetooth mode and behaves as the Heart Rate Application application. If Button 2 is pressed, the application switches to Gazell device mode. In this mode, it attempts to send packets to a host. If the packets are successfully sent, the BSP_INDICATE_SENT_OK state is indicated. If it fails, the BSP_INDICATE_SEND_ERROR state is indicated. If Button 1 is pressed, the application switches back to Bluetooth mode.

Note
This application is not power optimized!
In Bluetooth mode, the application goes to system-off after 3 minutes of advertising if no connection is initiated. Press Button 1 to restart in Bluetooth mode or Button 2 to restart in Gazell mode.
This application uses a local copy of Application Timer using SWI1 instead of SWI0.

Setup

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

Button assignments:

Testing

Test the Bluetooth part of the Multiprotocol Application with the nRF Toolbox app, which is available on both iOS (App Store) and Android (Google Play).

You can also test the application with nRF Connect for Desktop 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 nRF Connect (the device is advertising as 'Nordic_BLE_GZL'). Observe that the BSP_INDICATE_CONNECTED state is indicated.
  3. Observe that the services are shown in the connected device and that you can start receiving values for the Heart Rate and the Battery Service by clicking the 'Play' button. Heart Rate notifications are received every second, and Battery Level notifications are received every two seconds.
  4. Disconnect the device in nRF Connect. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
  5. Press the Gazell button (Button 2) and observe that the BSP_INDICATE_SEND_ERROR state is indicated (if a Gazell host device is running, you should observe that the BSP_INDICATE_SENT_OK state is indicated and that the LEDs on the host device are lit in a running sequence).

Documentation feedback | Developer Zone | Subscribe | Updated