All Projects → NordicSemiconductor → Android Nrf Mesh Library

NordicSemiconductor / Android Nrf Mesh Library

Licence: bsd-3-clause
The Bluetooth Mesh Provisioner and Configurator library.

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Android Nrf Mesh Library

Pedalinomini
Same features of Pedalino™ in a compact form.
Stars: ✭ 139 (-36.24%)
Mutual labels:  ble
Nrf52 Keyboard
A ble keyboard firmware using nrf52810/52832
Stars: ✭ 168 (-22.94%)
Mutual labels:  ble
Openmqttgateway
MQTT gateway for ESP8266, ESP32, Sonoff RF Bridge or Arduino with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility, SMS & LORA.
Stars: ✭ 2,413 (+1006.88%)
Mutual labels:  ble
Beacon Keeper
Simple android library for working with iBeacons in background
Stars: ✭ 141 (-35.32%)
Mutual labels:  ble
Node Ble
Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus
Stars: ✭ 159 (-27.06%)
Mutual labels:  ble
Reactivebeacons
Android library scanning BLE beacons nearby with RxJava
Stars: ✭ 171 (-21.56%)
Mutual labels:  ble
Gateway
Web site
Stars: ✭ 133 (-38.99%)
Mutual labels:  ble
Rxble
使用 RxJava 封装的低功耗蓝牙类库
Stars: ✭ 203 (-6.88%)
Mutual labels:  ble
Nrf5x
nRF51822 and nRF52832 based baords, e.g. BLE Nano, RBL_nRF51822, Nano 2 and Blend 2
Stars: ✭ 165 (-24.31%)
Mutual labels:  ble
Esp32 Ble Mouse
Bluetooth LE Mouse library for the ESP32 (Arduino IDE compatible)
Stars: ✭ 180 (-17.43%)
Mutual labels:  ble
Esp32 Blecollector
ᛡᛒ BLE Scanner + Data persistence on SD Card for M5Stack, Odroid-Go, ESP32-Wrover-Kit and other models
Stars: ✭ 145 (-33.49%)
Mutual labels:  ble
Ble
Connect to and interact with Bluetooth LE peripherals.
Stars: ✭ 156 (-28.44%)
Mutual labels:  ble
Androidblemanager
android BLE device scan and connect manager
Stars: ✭ 174 (-20.18%)
Mutual labels:  ble
Blinker Doc
blinker中文文档
Stars: ✭ 139 (-36.24%)
Mutual labels:  ble
Xiaomi Kettle
Xiaomi Kettle BLE protocol reverse-engineered
Stars: ✭ 187 (-14.22%)
Mutual labels:  ble
Ble.net
Cross-platform Bluetooth Low Energy (BLE) library for Android, iOS, and UWP
Stars: ✭ 137 (-37.16%)
Mutual labels:  ble
H Ble
Android Ble类库,基于回调,暴露搜索、连接、发送、接收、断开连接等接口,无需关心细节操作即可进行Ble通信。
Stars: ✭ 171 (-21.56%)
Mutual labels:  ble
Lego Ble Wireless Protocol Docs
This repository contains information about LEGO Hubs (name, battery level, etc.) and to interact with any sensors and motors connected to it.
Stars: ✭ 205 (-5.96%)
Mutual labels:  ble
Blessed Android
BLESSED, a Bluetooth Low Energy (BLE) library for Android
Stars: ✭ 195 (-10.55%)
Mutual labels:  ble
Continuity
Apple Continuity Protocol Reverse Engineering and Dissector
Stars: ✭ 180 (-17.43%)
Mutual labels:  ble

Android-nRF-Mesh-Library

Download

About

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.

Features

  1. Provisionig with all features that available in Bluetooth Mesh Profile 1.0.1, including OOB Public Key and all types of OOB.
  2. Managing Provisioners, Network Keys, Application Keys, resetting network, etc.
  3. All network layers are working.
  4. Parsing Secure Network beacons.
  5. Adding, removing and refreshing Network and Application Keys to Nodes.
  6. Binding and unbinding Application Keys to Models.
  7. Setting and clearing publication to a Model.
  8. Setting and removing subscriptions to a Model.
  9. Groups, including those with Virtual Addresses.
  10. UI for controlling groups (Generic OnOff and Generic Level (delta) are supported).
  11. Handling Configuration Server message sent by other Provisioner.
  12. Generic OnOff and Vendor model have dedicated controls in sample app.
  13. Proxy Filter.
  14. IV Index update (handling updates received in Secure Network beacons).

Requirements

  • Android Studio
  • An Android device with BLE capabilities

Optional

  • nrf52832/840 based Development Kit(s) to test the sample firmwares on.

Installation

  • 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 a nrf52832 DevKit.

How to include it in your own project

Maven Central or jcenter

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.4.3'

Manual

Clone this project and add ble module as a dependency to your project:

  1. In settings.gradle file add the following lines:
include ':mesh'
project(':mesh').projectDir = file('../Android-Mesh-Library/mesh')
  1. In app/build.gradle file add implementation project(':mesh') inside dependencies.
  2. Sync project and build it.

See example projects in this repository.

Sample

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. Follow the snippet below when using the Android-Ble-Library in combination with the Android-Mesh-Library to send and receive data.

    @Override
    public void onDataReceived(final BluetoothDevice bluetoothDevice, final int mtu, final byte[] pdu) {
        mMeshManagerApi.handleNotifications(mtu, pdu);
    }

    @Override
    public void onDataSent(final BluetoothDevice device, final int mtu, final byte[] pdu) {
        mMeshManagerApi.handleWriteCallbacks(mtu, pdu);
    }

When using your own ble library/module call the mMeshManagerApi.handleNotifications(mtu, pdu); and mMeshManagerApi.handleWriteCallbacks(mtu, pdu); to send and receive data.

Provisioning a node in to the network can be done in three steps,

  1. Connect to the node advertising with the Mesh Provisioning UUID
  2. Identify the node to be provisioned, where the devices will blink, vibrate or beep depending on the capabilities for pre-defined duration of 5 seconds. This is useful when provisioning multiple nodes. To identify a node call
    void identifyNode(@NonNull final UUID deviceUUID) throws IllegalArgumentException; 

by passing the device uuid of the unprovisioned mesh node. or call

    void identifyNode(@NonNull final UUID deviceUUID, final int attentionTimer) throws IllegalArgumentException;

by passing the device uuid of the unprovisioned mesh node and the desired duration. 3. Depending on the identified device capabilities, call one of the following functions to provision the node.

    void startProvisioning(@NonNull final UnprovisionedMeshNode unprovisionedMeshNode) throws IllegalArgumentException;

or

    void startProvisioningWithStaticOOB(@NonNull final UnprovisionedMeshNode unprovisionedMeshNode) throws IllegalArgumentException;

or

    void startProvisioningWithOutputOOB(@NonNull final UnprovisionedMeshNode unprovisionedMeshNode, final OutputOOBAction oobAction) throws IllegalArgumentException;

or

    void startProvisioningWithInputOOB(@NonNull final UnprovisionedMeshNode unprovisionedMeshNode, @NonNull final InputOOBAction oobAction) throws IllegalArgumentException;

Use the MeshNetowrk object to edit Mesh Network properties such as Network name, Provisioners and their properties (Name Address, TTL and Address Ranges), Network Keys, App Keys.

Following is an example on how to send a GenericOnOffSet message.

final GenericOnOffSet genericOnOffSet = new GenericOnOffSet(appKey, state,
                                new Random().nextInt(), transitionSteps, transitionStepResolution, delay);
mMeshManagerAPi.createMeshPdu(address, genericOnOffSet);

and Config messages can also be sent similarly.

Author

Mobile Applications Team, Nordic Semiconductor ASA.

Contact: roshanrajaratnam [email protected]

License

The Android-nRF-Mesh-Library is available under BSD 3-Clause license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].