All Projects → NordicSemiconductor → IOS-DFU-Library

NordicSemiconductor / IOS-DFU-Library

Licence: BSD-3-Clause License
OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to IOS-DFU-Library

Ios Pods Dfu Library
OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
Stars: ✭ 349 (-12.75%)
Mutual labels:  ota, bluetooth, ble, bluetooth-low-energy, bluetooth-le
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 (-96.5%)
Mutual labels:  bluetooth, 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 (-73%)
Mutual labels:  bluetooth, 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 (-78%)
Mutual labels:  bluetooth, ble, bluetooth-low-energy, bluetooth-le
Ble.net
Cross-platform Bluetooth Low Energy (BLE) library for Android, iOS, and UWP
Stars: ✭ 137 (-65.75%)
Mutual labels:  bluetooth, ble, bluetooth-low-energy, bluetooth-le
Easyble
Android BLE framework
Stars: ✭ 155 (-61.25%)
Mutual labels:  bluetooth, 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 (-60.25%)
Mutual labels:  bluetooth, 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 (-85%)
Mutual labels:  bluetooth, ble, bluetooth-low-energy, bluetooth-le
ESP32 BLE OTA Arduino
OTA update on ESP32 via BLE
Stars: ✭ 41 (-89.75%)
Mutual labels:  ota, ble, bluetooth-low-energy, bluetooth-le
pirowflo
All-in-one data interface for your Waterrower S4 Monitor or Smartrow
Stars: ✭ 73 (-81.75%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
BLELib
This library contains many of the features you need to interact with BLE peripherals
Stars: ✭ 21 (-94.75%)
Mutual labels:  bluetooth, ble, bluetooth-low-energy
BleLab
Bluetooth LE Lab - UWP application for interaction with BLE GATT devices
Stars: ✭ 68 (-83%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
PiBeacon
Low-cost iBeacon using Raspberry Pi
Stars: ✭ 41 (-89.75%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
bluetooth
Android Bluetooth examples
Stars: ✭ 80 (-80%)
Mutual labels:  bluetooth, ble, bluetooth-le
ESP32BleAdvertise
Simple library for BLE advertise using ESP32 in Arduino
Stars: ✭ 39 (-90.25%)
Mutual labels:  bluetooth, ble, bluetooth-low-energy
blatann
Python BLE library for the Nordic nRF52 connectivity firmware
Stars: ✭ 44 (-89%)
Mutual labels:  ble, bluetooth-low-energy, nrf52
Bluetooth-ble-beamer-and-scanner-for-tracing-corona-virus-infected-individual
Bluetooth ble beacon beamer and scanner for tracing corona virus infected person similar to Trace Together app
Stars: ✭ 26 (-93.5%)
Mutual labels:  bluetooth, ble, bluetooth-low-energy
theheraldproject.github.io
Herald - Proximity Detection Protocol and research documentation, including the Fair Efficacy Formula
Stars: ✭ 17 (-95.75%)
Mutual labels:  bluetooth, ble, bluetooth-low-energy
H.E.L.P.
Home Environment Locating People 🍍
Stars: ✭ 19 (-95.25%)
Mutual labels:  bluetooth, ble, bluetooth-low-energy
bluetooth-manager
Java Bluetooth Manager. A library/framework for managing bluetooth adapters, bluetooth devices, GATT services and characteristics
Stars: ✭ 75 (-81.25%)
Mutual labels:  bluetooth, ble, bluetooth-low-energy

iOS DFU Library

Version Carthage compatible

Installation

For Cocoapods:

  • Create/Update your Podfile with the following contents
target 'YourAppTargetName' do
    use_frameworks!
    pod 'iOSDFULibrary'
end
  • Install dependencies
pod install
  • Open the newly created .xcworkspace

  • Import the library to any of your classes by using import iOSDFULibrary and begin working on your project

For Carthage:

  • Create a new Cartfile in your project's root with the following contents
github "NordicSemiconductor/IOS-DFU-Library" ~> x.y //Replace x.y with your required version
  • Build with carthage
carthage update --platform iOS //also OSX platform is available for macOS builds
  • Carthage will build the iOSDFULibrary.framework and ZipFramework.framework files in Carthage/Build/, you may now copy all those files to your project and use the library, additionally, carthade also builds *.dsym files if you need to resymbolicate crash logs. you may want to keep those files bundled with your builds for future use.

For Swift Package Manager:

// swift-tools-version:5.5
import PackageDescription

let package = Package(
  name: "<Your Product Name>",
  dependencies: [
    .package(
      url: "https://github.com/NordicSemiconductor/IOS-DFU-Library", 
      .upToNextMajor(from: "<Desired Version, e.g. 4.11.1>")
    )
  ],
  targets: [.target(name: "<Your Target Name>", dependencies: ["NordicDFU"])]
)

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.

This repository contains a tested library for iOS 8+ platform which may be used to perform Device Firmware Update on the nRF5x device using an iPhone or an iPad.

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

Service Changed characteristic

In order the DFU to work with iOS, the target device MUST have the Service Changed characteristic with Indicate property in the Generic Attribute service. Without this characteristic iOS will assume that services of this device will never change and will not invalidate them after switching to DFU bootloader mode.

Service Changed characteristic behaviour:
  • On paired devices a change of the attribute table must be indicated using an indication to the Service Changed characteristic. iOS automatically enables the CCC and handles this indication and performs a service discovery. This indication is handled correctly in Legacy DFU since SDK 8.0.
  • On non-trusted devices (not paired) iOS will clear the service cache every time the device disconnects.
Secure DFU from SDK 12:
  • The Secure DFU implementation from SDK 12 does not support bonding (experimental buttonless sample does not pass bond information when switching to DFU bootloader mode and the bootloader does not send S-C indication). As a workaround, the bootloader starts to advertise with MAC address incremented by 1, so from the phone's perspective it's a completly new device and a fresh service discovery will be done. When your new firmware is going to change the list of services you may consider adding another 1 to the MAC address for the new application to make sure the cache will not conflict (unless the device is not bonded and you have Service Changed characteristic, then no caching is used as written above). Be aware, that adding 1 to a public address is not possible (unless you register a new one). Also, devices may be sold with following MAC addresses and it may happen that 2 devices have the same one. Use this feature carefully.
Secure DFU from SDK 14:
  • Buttonless DFU with Bonds Sharing has been added to the SDK. Bonded relationship is required to use this service. Address does not change when in DFU mode, instead the bootloader sends Service Changed indication when entered DFU mode and app mode. For bonded devices it is recommended to use this service.

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. New features:
  • 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. This library is fully backwards compatible so supports both the new and legacy DFU.
  • 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 no longer experimental. New buttonless characteristic added for bonded devices (requires bond, cache cleaning relies on Service Changed indication).
  • 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 set enableUnsafeExperimentalButtonlessServiceInSecureDfu to true to enable it, this is off by default. 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

An unofficial 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

Xamarin

Simple binding library for iOS is available on nuget: Laerdal.Xamarin.Dfu.iOS


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