Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.SomaticLabs:Android-DFU-Library:'
}
dependencies {
implementation("com.github.SomaticLabs:Android-DFU-Library:")
}
<dependency>
<groupId>com.github.SomaticLabs</groupId>
<artifactId>Android-DFU-Library</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.SomaticLabs" % "Android-DFU-Library" % ""
:dependencies [[com.github.SomaticLabs/Android-DFU-Library ""]]
The compat library may be found on jcenter and Maven Central repository. Add it to your project by adding the following dependency:
compile 'no.nordicsemi.android:dfu:1.3.0'
If you use proguard, add the following line to your proguard rules:
-keep class no.nordicsemi.android.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.
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.
See the documentation for more information.
The library is compatible with nRF51 and nRF52 devices with S-Series Soft Device and the DFU Bootloader flashed on.
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 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 (when released) for bonded). Both are supported since DFU Library 1.3.0.
Check platform folders for mode details about compatibility for each library.