This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with OTA DFU using nrfutil

I would like to perform a OTA DFU in a nRF52840 DK using nrfutil. For that, I'm using the example that is in SDK/examples/dfu/secure_bootloader/pca10056_s140_ble in the target. Here are the commands I use to build the.zip and to perform the DFU:

nrfutil pkg generate --hw-version 52 --application-version 1 --application nrf52840_xxaa_s140.hex --sd-req 0xCA --key-file private.key app_dfu_package.zip

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

However, when trying to perform the DFU, I receive this error: 

pc_ble_driver_py.exceptions.NordicSemiException: Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice.

How could I solve this problem? I'm using SDK 17.0.2 (softdevice s140_nrf52_7.2.0) and Keil5 as IDE.

Any help would be appreciated.

  • The error indicates that the SoftDevice you have listed as required (ID 0xCA) is not found on the device. Do you know which SoftDevice you built your application for, and which SoftDevice is already on the device you try to update? If it is the same, then you just need to use the correct SoftDevice ID with the --sd-req option. If the SoftDevice is not the same, then you should include also the SoftDevice in the package you generate.

  • Hi Einar. Thanks for replying. I changed the softdevice and now I'm using the s140_nrf52_7.0.1 which corresponds to the ID 0xCA and it seems to work! I get the message Device programmed in the command window. However, the firmware that I used to do the DFU (FreeRTOS blinky led) doesn't work in the target (the leds doesn't blink). What did I do wrong? Though, I followed this guide.

  • Hi,

    Did you build your firmware and bootloader to use the same SoftDevice version? Did you test that the application you built works without flashing the bootloader (so if the device only has the SoftDevice + application)?

  • 1. If I'm not wrong, the firmware I'm using (the blinky_freertos example) doesn't use the SoftDevice.
    2. Yes, I test my application without flashing the bootloader (nor the SoftDevice) and it works.

  • jPolo777 said:
    2. Yes, I test my application without flashing the bootloader (nor the SoftDevice) and it works.

    I see. Please note that the blinky_freertos example if you have not modified it starts at address 0, so you need to modify this to use it with a SoftDevice (even if the example does not use the SoftDevice it must be located immediately after the SoftDevice as you need that for the BLE bootloader. The fact that this works without having a SoftDevice means that you have not done this, and thus it cannot work in the setup you want (SoftDevice + BLE Bootloader).

    So you need to relocated it the application. I suggest you look at an example that use the same SoftDevice version as you and see the linker configuration there. Then I suggest you test it with a SoftDevice (even though not using it) to see that it works. Once that is in place you can move forward to test DFU.

Related