The Android-nRF-Mesh-Library allows provisioning and sending messages to Bluetooth Mesh devices.
Bluetooth Mesh specification may be found here: https://www.bluetooth.com/specifications/mesh-specifications/
The library is compatible with version 1.0.1 of the Bluetooth Mesh Profile Specification.
nRF Mesh for Android is supported on Android devices running Android 4.3 and onwards.
- Provisionig with all features that available in Bluetooth Mesh Profile 1.0.1, including OOB Public Key and all types of OOB.
- Managing Provisioners, Network Keys, Application Keys, resetting network, etc.
- All network layers are working.
- Parsing Secure Network beacons.
- Adding, removing and refreshing Network and Application Keys to Nodes.
- Binding and unbinding Application Keys to Models.
- Setting and clearing publication to a Model.
- Setting and removing subscriptions to a Model.
- Groups, including those with Virtual Addresses.
- UI for controlling groups (Generic OnOff and Generic Level (delta) are supported).
- Handling Configuration Server message sent by other Provisioner.
- Generic OnOff and Vendor model have dedicated controls in sample app.
- Proxy Filter.
- IV Index update (handling updates received in Secure Network beacons).
- Android Studio
- An Android device with BLE capabilities
- nrf52832/840 based Development Kit(s) to test the sample firmwares on.
- Open 'Example/nRf Mesh Provisioner'
- Connect an Android device.
- Build and run project.
- To be able to quickly start testing, use the bundled firmwares directory named
ExampleFirmwares
that includes a light server (Light source) and a light client (Switch) firmwares. those firmwares will work on anrf52832
DevKit.
The library may be found on jcenter and Maven Central repository. Add it to your project by adding the following dependency:
implementation 'no.nordicsemi.android:mesh:2.3.0'
Clone this project and add ble module as a dependency to your project:
- In settings.gradle file add the following lines:
include ':mesh'
project(':mesh').projectDir = file('../Android-Mesh-Library/mesh')
- In app/build.gradle file add
implementation project(':mesh')
inside dependencies. - Sync project and build it.
See example projects in this repository.
To start using the library in your own project take a look at the followign snippet.
MeshManagerApi mMeshManagerApi = new MeshManagerApi(context);
mMeshManagerApi.setMeshManagerCallbacks(this);
mMeshManagerApi.setProvisioningStatusCallbacks(this);
mMeshManagerApi.setMeshStatusCallbacks(this);
mMeshManagerApi.loadMeshNetwork();
The sample application uses the Android BLE Library by Nordic Semiconductor ASA and is recommended to use this dependency in your application.
Mobile Applications Team, Nordic Semiconductor ASA.
Contact: roshanrajaratnam [email protected]
The Android-nRF-Mesh-Library is available under BSD 3-Clause license. See the LICENSE file for more info.