Home

Awesome

Web Bluetooth DFU

Circle CI Bower npm Licence MIT

Update device firmware via Nordic's DFU protocols using Web Bluetooth.

Versions

Since version 12 of Nordic's SDK, the device firmware update protocol has changed to be made secure. The protocol can be seen here:

https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/lib_dfu_transport_ble.html

Earlier protocols were insecure, so it is recommended to use the secure protocol version in this package.

Features

Live Example

This repo has a live web example of the secure DFU. Open this site in a Web Bluetooth enabled browser:

https://thegecko.github.io/web-bluetooth-dfu/

Prerequisites

Node.js > v8.14.0, which includes npm.

Installation

The package is distributed using npm. To install the package in your project:

$ npm install web-bluetooth-dfu

Device Configuration

You will need a Nordic nRF51822, nRF52832 or nRF52840 development kit running the latest softdevice. Secure DFU supports softdevices from S130.

Softdevices can be found on Nordic's site:

Upon flashing the device will be in bootloader mode and ready to receive a DFU transfer.

Example packages to update can be found in the firmware folder.

Device Development

An excellent article exists with a walkthrough of using the device firmware update here:

https://devzone.nordicsemi.com/blogs/1085/getting-started-with-nordics-secure-dfu-bootloader/

tl;dr

J-LINK Interface Firmware

Download / Install

Flashing SoftDevice

Using Test DFU Bootloader

Signing Keys

Developing an Application

Building DFU Package

Refer to this document:

https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.0.0/ble_sdk_app_dfu_bootloader.html

e.g.:

$ nrfutil pkg generate --debug-mode --application <your_app.hex> --key-file private.key dfu_app.zip