Skip to content

moveinnovation/pc-nrfutil

 
 

Repository files navigation

About this fork

This is a fork of anszom's fork of Nordic's nrfutil. Whereas anszom's fork adds support for OTA DFU via. a native bluetooth device using BLE_GATT, this fork attempts to do the same using bluepy.

Installation

$ [sudo] python setup.py install

Usage

The bluepy transport backend has not yet :been added to the nrfutil CLI tool. However, after installation, the functionality can be accessed via the python package:

from nordicsemi.dfu import dfu, dfu_mode_jumper

ZIP_FILE_PATH = "foo-dfu_package.zip"
ADDR          = "XX:XX:XX:XX:XX:XX"

# setup buttonless jumper and extract dfu transport from it.
jumper       = dfu_mode_jumper.DfuModeJumper(ADDR)
my_transport = jumper.intoDfuTransportBluepy()

my_dfu       = dfu.Dfu(ZIP_FILE_PATH, my_transport, 0)

# initiate jump to DFU mode, after which ADDR should disconnect.
jumper.jump_to_dfu_mode()

# at this point the device with address ADDR should be disconnected.

my_dfu.dfu_send_images()

For the time being, the jumping to DFU mode is its own module separate from the actual DFU, to better be able to test against anszom's fork, which assumes that the device is already in DFU mode. The DfuModeJumper also includes a .intoDfuTransportNative() for use with anszom's DfuTransportBleNative.


Below is a copy of Nordic's original README.

nRF Util

Latest version License Build Status

nRF Util is a Python package and command-line utility that supports Device Firmware Updates (DFU) and cryptographic functionality.

screenshot

Documentation

See the InfoCenter pages for information on how to install and use nRF Util.

Feedback

Please report issues on the DevZone portal.

Contributing

Feel free to propose changes by creating a pull request.

If you plan to make any non-trivial changes, please start out small and ask seek an agreement before putting too much work in it. A pull request can be declined if it does not fit well within the current product roadmap.

In order to accept your pull request, we need you to sign our Contributor License Agreement (CLA). You will see instructions for doing this after having submitted your first pull request.

License

See the LICENSE file for details.

About

This fork of Nordic's nrfutil introduces support for OTA DFU of NRF devices using Bluepy, for use on Linux (eg. on a Raspberry Pi).

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 99.4%
  • Gherkin 0.6%