nRF5 SDK v15.0.0
Experimental: Bluetooth Developer Studio Example
This example requires one of the following SoftDevices: S132, S140

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

The bluetoothds_template application is an example that you can use as a starting point for developing your own application using services generated by Bluetooth Developer Studio.

Note
The application will stop advertising after 3 minutes and go to system-off mode. Push Button 1 to wake it up and restart advertising.

Implementation

To implement your own application, you must first generate a custom profile in Bluetooth Developer Studio. You can then use this custom profile in the example application.

Generating a custom profile

  1. Create a custom profile:
    1. Click File > New.
    2. Rename the Project to, for example, "Test project".
    3. Enter a string for NAMESPACE, for example "com.MyCompany".
    4. Rename the Profile to, for example, "Test Profile"
  2. Create a custom service:
    1. Click CUSTOM SERVICE.
    2. Rename the new service to, for example, "Test profile test service".
  3. Add a new characteristic:
    1. Click +.
    2. Rename the new characteristic to, for example, "RX".
    3. Set the Read/Write/Notify/Indicate properties. For example, set "Write Without Response" to "Mandatory".
    4. Add fields to the characteristic. For example, add a "value" field with format "_VARIABLE".
  4. Add further characteristics, if required. For example, add a "TX" characteristic with the Notify property set to "Mandatory" and a "_VARIABLE" field named "value".
  5. Generate the code:
    1. Click Tools > Generate Code.
    2. Select "Server" and "NORDIC SEMICONDUCTOR NRF5X V1.1.x".

Including the custom profile

In the Keil project, add the source file of the service by adding ble_test_profile_test_service.c to the group nRF_BLE.

Setup

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

Buttons assignments:

Testing

Test the Template Application with nRF Connect 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_BDS'). Observe that the BSP_INDICATE_CONNECTED state is indicated.
  3. Disconnect the device in nRF Connect and observe that the BSP_INDICATE_ADVERTISING state is indicated. You can wait for 3 minutes and observe that the BSP_INDICATE_IDLE is indicated.
  4. In system-off mode, press Button 1 and observe that the application starts advertising again.

Documentation feedback | Developer Zone | Subscribe | Updated