This example demonstrates how nRF5 SDK for Mesh and nRF5 SDK examples can be used together at the same time. It is built around two examples and has two parts:
- The Bluetooth mesh part of this example implements the light switch client example from the nRF5 SDK for Mesh.
- The BLE part of the example implements the Proximity Application example from the nRF5 SDK, except for the following changes:
- The BSP events
SLEEPandDISCONNECTare ignored. - The advertising interval is increased to allow more time for the Bluetooth mesh stack.
- The example is not configured to enter the system-off mode, like in its nRF5 SDK version.
- The BSP events
As the result of running this example, you'll be able to use a Bluetooth mesh network in which this example can replace the light switch client example.
Before you start testing this coexistence example, see the following pages:
- Integrating Bluetooth mesh into nRF5 SDK examples
- Light switch example and Light switch client details and Bluetooth mesh APIs
Hardware requirements
You need the same amount of development kits as for testing the light switch client example.
Additionally, you need one development kit for the static provisioner example. For details, see software requirements.
See Compatibility for information about the compatible development kits.
- Note
- While this example is compatible with nRF52840 and nRF52833 development kits, the nRF5 SDK for Mesh only provides SES files for nRF52832.
Software requirements
This example does not support PB-GATT for provisioning. For this purpose, use the static provisioner example: <InstallFolder>/examples/provisioner. See the provisioner example page for more information.
Setup
You can find the source code of the SDK Proximity coexistence example in the following nRF5 SDK for Mesh folder: <InstallFolder>/examples/sdk_coexist/ble_app_proximity_coexist
The source code of the light switch client example is located at the following path: <InstallFolder>/examples/light_switch/client
Testing the example
Complete the following steps to program the SDK Proximity coexistence example and the light switch example devices:
- Copy the
ble_app_proximity_coexistfolder into theexamples/ble_peripheralfolder at your nRF5 SDK installation path. - Open the Segger Embedded Studio project at
ble_app_proximity_coexist/pca10040/s132/ses/ble_app_proximity_pca10040_s132.emProject. - Add MESH_ROOT to your Segger Embedded Studio global macro list:
- From the SES menu bar, click Tools > Options....
- In the left column, click Building.
- In right column, double click Global macros.
- Add your Bluetooth mesh root directory in a new line:
MESH_ROOT=<path to your Bluetooth mesh SDK installation>.
- Ensure that the flash is completely erased before programming this example. Otherwise Flash Data Storage module will not work correctly.
- Program the light switch example devices as described in the Light switch example, including the servers and the static provisioner, with the following exceptions:
- Replace the light switch client with
examples/ble_peripheral/ble_app_proximity_coexist/pca10040/s132/ses/Output/Release/Exe/ble_app_proximity_pca10040_s132.hex. - Do not use the nRF Mesh mobile application for provisioning. Only use the static provisioner.
- Replace the light switch client with
You can now run the two coexisting examples in parallel or in sequence:
- Run the light switch client example as described in light switch example documentation.
- Run the Proximity Application example as described in the nRF5 SDK documentation.