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

Error updating nRF51 with nrfutil DFU

I'm writing a production script that uses nrfutil to do OTA DFU for both nRF51 and nRF52 radios. I'm using a PCA10059 with nrfutil version 3.5.1.

It works fine for an nRF52 with this command:

nrfutil.exe dfu ble -p COM14 -a E56263CE8257 -ic NRF52 -pkg nRF52_app.zip

It fails on an nRF51 with this command:

nrfutil.exe dfu ble -p COM14 -a E1C1859DC950 -ic NRF51 -pkg nRF51_app.zip

The error message is below. Any ideas what, specifically, the "Failed to ble_enable" message means and how to resolve it?

Traceback (most recent call last):
  File "nordicsemi\__main__.py", line 987, 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 838, in ble
  File "nordicsemi\dfu\dfu.py", line 129, in dfu_send_images
  File "nordicsemi\dfu\dfu.py", line 90, in _dfu_send_image
  File "nordicsemi\dfu\dfu_transport_ble.py", line 450, in open
  File "nordicsemi\dfu\dfu_transport_ble.py", line 116, in open
  File "site-packages\pc_ble_driver_py\ble_driver.py", line 126, in wrapper
pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_enable. Error code: 3
Failed to execute script __main__

Parents
  • Hi.

    How did you generate nRF51_app.zip? Which SDK do you use on the nRF51 device?

    The issue could be that you do not generate a compatible packet, as described in the README for nrfutil.

    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
    • Versions 5.0.0 and later generate modern firmware packages compatible with nRF SDK 15.3 and newer

    Note: In order to generate firmware images, compatible with nRF SDK 12.0 to nRF SDK 15.0, use --no-backup switch during generation of DFU settings.

    Best regards,

    Andreas

Reply
  • Hi.

    How did you generate nRF51_app.zip? Which SDK do you use on the nRF51 device?

    The issue could be that you do not generate a compatible packet, as described in the README for nrfutil.

    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
    • Versions 5.0.0 and later generate modern firmware packages compatible with nRF SDK 15.3 and newer

    Note: In order to generate firmware images, compatible with nRF SDK 12.0 to nRF SDK 15.0, use --no-backup switch during generation of DFU settings.

    Best regards,

    Andreas

Children
No Data
Related