All Projects → NordicSemiconductor → Android Dfu Library

NordicSemiconductor / Android Dfu Library

Licence: bsd-3-clause
A library with DFU feature for Android 4.3+.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Dfu Library

ruuvitag-demo
Demo of reading Bluetooth Low Energy sensor measurements of RuuviTag environmental sensors and feeding them to MQTT, a database and dashboards
Stars: ✭ 14 (-97.37%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Ble Security Attack Defence
✨ Purpose only! The dangers of Bluetooth Low Energy(BLE)implementations: Unveiling zero day vulnerabilities and security flaws in modern Bluetooth LE stacks.
Stars: ✭ 88 (-83.46%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Android Scanner Compat Library
A compat library for Bluetooth Low Energy scanning on Android.
Stars: ✭ 462 (-13.16%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
ESP32 BLE OTA Arduino
OTA update on ESP32 via BLE
Stars: ✭ 41 (-92.29%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Rxandroidble
An Android Bluetooth Low Energy (BLE) Library with RxJava2 interface
Stars: ✭ 3,025 (+468.61%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Ios Pods Dfu Library
OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
Stars: ✭ 349 (-34.4%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
IOS-DFU-Library
OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
Stars: ✭ 400 (-24.81%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Extendable
Blocks Based Bluetooth LE Connectivity framework for iOS/watchOS/tvOS/OSX. Quickly configure centrals & peripherals, perform read/write operations, and respond characteristic updates.
Stars: ✭ 88 (-83.46%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Ble.net
Cross-platform Bluetooth Low Energy (BLE) library for Android, iOS, and UWP
Stars: ✭ 137 (-74.25%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Nimble Arduino
A fork of the NimBLE library structured for compilation with Ardruino, designed for use with ESP32.
Stars: ✭ 108 (-79.7%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Node Ble
Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus
Stars: ✭ 159 (-70.11%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Easyble
Android BLE framework
Stars: ✭ 155 (-70.86%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
py-bluetooth-utils
Python module containing bluetooth utility functions, in particular for easy BLE scanning and advertising
Stars: ✭ 60 (-88.72%)
Mutual labels:  ble, bluetooth-low-energy, bluetooth-le
Bluetoothle
Easy to use, cross platform, REACTIVE BluetoothLE Plugin for Xamarin
Stars: ✭ 357 (-32.89%)
Mutual labels:  ble, bluetooth-le
ble-utilities-unreal
This is Unreal Engine plugin that allows to scan for BLE devices with Cycling Power service running, connect to one of them and subscribe for its notifications.
Stars: ✭ 48 (-90.98%)
Mutual labels:  ble, bluetooth-low-energy
BleLab
Bluetooth LE Lab - UWP application for interaction with BLE GATT devices
Stars: ✭ 68 (-87.22%)
Mutual labels:  bluetooth-low-energy, bluetooth-le
pirowflo
All-in-one data interface for your Waterrower S4 Monitor or Smartrow
Stars: ✭ 73 (-86.28%)
Mutual labels:  bluetooth-low-energy, bluetooth-le
android-ble-made-easy
An Android Library for handling Bluetooth Low Energy on Android Easy
Stars: ✭ 34 (-93.61%)
Mutual labels:  ble, bluetooth-low-energy
stm32wb55
Implementation of bluetooth-hci for STM32WB5x wireless SoC
Stars: ✭ 18 (-96.62%)
Mutual labels:  ble, bluetooth-low-energy
Btle
Bluetooth Low Energy (BLE) packet sniffer and transmitter for both standard and non standard (raw bit) based on Software Defined Radio (SDR).
Stars: ✭ 411 (-22.74%)
Mutual labels:  ble, bluetooth-low-energy

DFU Library

Download

Usage

The DFU library may be found on jcenter and Maven Central repository. Add it to your project by adding the following dependency:

implementation 'no.nordicsemi.android:dfu:1.11.0'

For projects not migrated to Android Jetpack, use:

implementation 'no.nordicsemi.android:dfu:1.8.1'

Note: This version is not maintained anymore. All new features and bug fixes will be released on the latest version only.

If you use proguard/R8, add the following line to your proguard rules (although this should be added automatically): -keep class no.nordicsemi.android.dfu.** { *; }

Location Permission required

If your device is using the Nordic Buttonless Service for switching from app mode to DFU bootloader mode, this library will handle switching automatically. In case your bootloader is configured to advertise with incremented MAC address (that is you use Secure DFU and the device is not bonded) this library will need to scan for the new BluetoothDevice. Starting from Android Marshmallow, location permission is required and has to be granted in runtime before DFU is started.

Starting from Android 8.1.0, all scans done without a scan filter whilst the screen is turned off will not return any scan results.

Note: "ACCESS_BACKGROUND_LOCATION" permission would also be required to trigger a successful DFU whilst the device screen is turned off, mainly to receive the scan results when scanning and connecting to the peripheral in bootloader mode while the device screen is turned off.

Retrying

Starting from version 1.9.0 the library is able to retry a DFU update in case of an unwanted disconnection. However, to maintain backward compatibility, this feature is by default disabled. Call initiator.setNumberOfRetries(int) to set how many attempts the service should perform. Secure DFU will be resumed after it has been interrupted from the point it stopped, while the Legacy DFU will start again.

Device Firmware Update (DFU)

The nRF5x Series chips are flash-based SoCs, and as such they represent the most flexible solution available. A key feature of the nRF5x Series and their associated software architecture and S-Series SoftDevices is the possibility for Over-The-Air Device Firmware Upgrade (OTA-DFU). See Figure 1. OTA-DFU allows firmware upgrades to be issued and downloaded to products in the field via the cloud and so enables OEMs to fix bugs and introduce new features to products that are already out on the market. This brings added security and flexibility to product development when using the nRF5x Series SoCs.

Device Firmware Update

This repository contains a tested library for Android 4.3+ platform which may be used to perform Device Firmware Update on the nRF5x device using a phone or a tablet.

DFU library has been designed to make it very easy to include these devices into your application. It is compatible with all Bootloader/DFU versions.

Alt text for your video

Documentation

See the documentation for more information.

Requirements

The library is compatible with nRF51 and nRF52 devices with S-Series Soft Device and the DFU Bootloader flashed on.

DFU History

Legacy DFU

  • SDK 4.3.0 - First version of DFU over Bluetooth Smart. DFU supports Application update.
  • SDK 6.1.0 - DFU Bootloader supports Soft Device and Bootloader update. As the updated Bootloader may be dependent on the new Soft Device, those two may be sent and installed together.
    • Buttonless update support for non-bonded devices.
  • SDK 7.0.0 - The extended init packet is required. The init packet contains additional validation information: device type and revision, application version, compatible Soft Devices and the firmware CRC.
  • SDK 8.0.0 - The bond information may be preserved after an application update. The new application, when first started, will send the Service Change indication to the phone to refresh the services.
    • Buttonless update support for bonded devices
    • sharing the LTK between an app and the bootloader.

Secure DFU

  • SDK 12.0.0 - New Secure DFU has been released. Buttonless service is experimental.
  • SDK 13.0.0 - Buttonless DFU (still experimental) uses different UUIDs. No bond sharing supported. Bootloader will use address +1.
  • SDK 14.0.0 - Buttonless DFU is no longer experimental. A new UUID (0004) added for bonded only devices (previous one (0003) is for non-bonded only).
  • SDK 15.0.0 - Support for higher MTUs added.

This library is fully backwards compatible and supports both the new and legacy DFU. The experimental buttonless DFU service from SDK 12 is supported since version 1.1.0. Due to the fact, that this experimental service from SDK 12 is not safe, you have to call starter.setUnsafeExperimentalButtonlessServiceInSecureDfuEnabled(true) to enable it. Read the method documentation for details. It is recommended to use the Buttonless service from SDK 13 (for non-bonded devices, or 14 for bonded). Both are supported since DFU Library 1.3.0.

Check platform folders for mode details about compatibility for each library.

React Native

A library for both iOS and Android that is based on this library is available for React Native: react-native-nordic-dfu

Flutter

A library for both iOS and Android that is based on this library is available for Flutter: flutter-nordic-dfu

Resources

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].