Skip to content

Execute a Device Firmware Update (DFU) on your nRF51 or nRF52 chip from Nordic Semiconductor. Fork from flutter_nordic_dfu.

License

Notifications You must be signed in to change notification settings

GaelleJoubert/nordic_dfu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nordic_dfu

style: lint pub package mobile_scanner GitHub Sponsors

5.0.0 Breaking changes!

From version 5.0.0, the callbacks are defined as function parameters in NordicDfu().startDfu(). Please see the example app for more information.

4.0.0 Breaking changes!

From version 4.0.0, the NordicDfu class uses a Singleton. If you are comming from an older version, you have to change the notation from NordicDfu.startDfu() to NordicDfu().startDfu().

Fork from flutter_nordic_dfu and updated with latest dependencies.

This library allows you to do a Device Firmware Update (DFU) of your nrf51 or nrf52 chip from Nordic Semiconductor. It works for Android and iOS.

This is the implementation of the reference "react-native-nordic-dfu"

For more info about the DFU process, see: Resources

Run example

  1. Add your dfu zip file to example/assets/file.zip

  2. Run example project

  3. Scan device

  4. Start dfu

Usage

You can pass an absolute file path or asset file to NordicDfu

Use absolute file path
await NordicDfu().startDfu(
            'EB:75:AD:E3:CA:CF', '/file/to/zip/path/file.zip'
         );
// With callback
await NordicDfu().startDfu(
      'EB:75:AD:E3:CA:CF',
      'assets/file.zip',
      fileInAsset: true,
      onProgressChanged: (
        deviceAddress,
        percent,
        speed,
        avgSpeed,
        currentPart,
        partsTotal,
      ) {
        print('deviceAddress: $deviceAddress, percent: $percent');
      },
    );
Use asset file path
/// just set [fileInAsset] true
await NordicDfu().startDfu(
            'EB:75:AD:E3:CA:CF', 'assets/file.zip',
            fileInAsset: true,
         );

Resources

About

Execute a Device Firmware Update (DFU) on your nRF51 or nRF52 chip from Nordic Semiconductor. Fork from flutter_nordic_dfu.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 38.1%
  • Kotlin 37.7%
  • Swift 17.8%
  • Ruby 4.8%
  • Objective-C 1.6%