This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51822 nrfutil dfu ble

Hello Nordic team

I am working on nRF51822 MCU.

My question is I can generate the DFU zip file and it working with nRFConnect and nRF Tool Box mobile application. But when I am trying to upload the file via nrfutill dfu ble it gave following errors:

No target selected. Default device name: DfuTarg is used.
Please select connectivity serial port:
0 : COM8 - 682271192
1 : COM17 - 681155878
Enter your choice: : 0
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 1133, in <module>
File "site-packages\click\core.py", line 722, in __call__
File "site-packages\click\core.py", line 697, in main
File "site-packages\click\core.py", line 1066, in invoke
File "site-packages\click\core.py", line 1066, in invoke
File "site-packages\click\core.py", line 895, in invoke
File "site-packages\click\core.py", line 535, in invoke
File "nordicsemi\__main__.py", line 945, in ble
File "nordicsemi\dfu\dfu.py", line 71, in __init__
File "nordicsemi\dfu\package.py", line 571, in unpack_package
File "nordicsemi\dfu\manifest.py", line 202, in from_json
TypeError: __init__() got an unexpected keyword argument 'dfu_version'
Failed to execute script __main__

I used following command:

nrfutil dfu ble -ic NRF52 -pkg app_dfu_package.zip -p COM3 -n "MyDevice" -f

Also, help me how to use nRFConnect PC software to upload DFU file?

Please help me why above error I received and how to use nRFConnect PC software to send DFU file.

Any help will be appreciated.

Regards

Raj
  • Hi.

    You have a nRF51822 board?

    But you have put NRF52 in you nrfutil command.

    Try:

    nrfutil dfu ble -ic NRF51 -pkg app_dfu_package.zip -p COM3 -n "MyDevice" -f

    Note that the --help option is useful if you are unsure what your command should be.

     nrfutil dfu ble --help
    Usage: nrfutil dfu ble [OPTIONS]
    
      Perform a Device Firmware Update on a device with a bootloader that
      supports BLE DFU. This requires a second nRF device, connected to this
      computer, with connectivity firmware loaded. The connectivity device will
      perform the DFU procedure onto the target device.
    
    Options:
      -pkg, --package PATH            Filename of the DFU package.  [required]
      -ic, --conn-ic-id [NRF51|NRF52]
                                      Connectivity IC family: NRF51 or NRF52
                                      [required]
      -p, --port TEXT                 Serial port COM port to which the
                                      connectivity IC is connected.
      -cd, --connect-delay INTEGER    Delay in seconds before each connection to
                                      the target device during DFU. Default is 3.
      -n, --name TEXT                 Device name.
      -a, --address TEXT              BLE address of the DFU target device.
      -snr, --jlink_snr TEXT          Jlink serial number for the connectivity IC.
      -f, --flash_connectivity        Flash connectivity firmware automatically.
                                      Default: disabled.
      --help                          Show this message and exit.

    Best regards,

    Andreas

  • Hi Andreas

    As I mentioned I have used nRF51822 board (custom designed board). 

    I have mentioned 

    nrfutil dfu ble -ic NRF52 -pkg app_dfu_package.zip -p COM3 -n "MyDevice" -f


    command which is the typo. I have tried with nRF51.

    So, your reply doesn't help me. And I know --help command.

    Thanks

    Raj

  • As per my thought this is seems like dfu_version issue which cause from miss match of nrfutil version. But I need any expert suggestion on this to move on positive direction to resolve this issue.

    I am using nrfutil version is 0.3.0 to create dfu package and also using same version of nrfutil for update DFU zip file over ble.

    Does 0.3.0 is right version I am using?

  • Hi.

    Which SDK do you use?

    The DFU package format transitioned from legacy to modern in SDK 12.0. Depending on the SDK version that you are using you will need to select a release of this tool compatible with it:

    • Version 0.5.2 generates legacy firmware packages compatible with nRF SDK 11.0 and older
    • Versions 1.5.0 and later generate modern firmware packages compatible with nRF SDK 12.0 and newer
    • Versions 4.0.0 and later generate modern firmware packages compatible with nRF SDK 15.1 and newer
    Rajneesh said:
    So, your reply doesn't help me

     Regardless of this not working right away you need to use the "-ic NRF51" tag when you have a nRF51 board.

    Rajneesh said:
    I am using nrfutil version is 0.3.0 to create dfu package and also using same version of nrfutil for update DFU zip file over ble.

     nrfutil version 0.3.0.0 is the Mesh version.

    Best regards,

    Andreas

Related