| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Multiprotocol Application
The Gazell protocol is considered experimental for the nRF52 Series.
This example requires the following SoftDevice: S130

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:

- During system-off:
  - Button 1: Wake up and start advertising in Bluetooth mode.
  - Button 2: Wake up and start advertising in Bluetooth mode.

- During Advertising and Connection:
  - Button 1: Switch to Bluetooth mode.
  - Button 2: Switch to Gazell device mode.

# 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 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_BLE_GZL'), then 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 Heart Rate notifications are received every second, and Battery Level notifications are received every two seconds.
4. Click on the Disconnect button on the Master Control Panel. 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).