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

Result code 3 - INVALID_PARAMETER error when flashing application to unit with nRF Connect

Hello!

I am working on updating from SDK 15.2.0 to the SDK 16.0.0 and have encountered some problems when trying to use DFU OTA to flash my unit with the application.

I'm using a nRF52832 with the latest SDK (16.0.0) and SoftDevice (s132_nrf52_7.0.1). 

There is no problem flashing the bootloader, softdevice and application using a JLink. But when trying to update using DFU OTA I encounter the above mentioned problem:

It happens just when it seems to be finished.

I have debugged the bootloader and narrowed the issue down to happening in nrf_dfu_req_handler -> on_data_obj_write_request because s_dfu_settings.progress.data_object_size = 0

Parents Reply Children
  • I have tried using nRF Connect on iOS as well. It did not work either.

    It said it could not load firmware. We have not had any issues with OTA with the old SDK. Not with desktop nRF Connect or for iOS. 

     

    We are using an nRF52840 dongle for OTA DFU. So I don't think that is applicable for us. 

    I forgot to mention it, but my bootloader is properly flashed OTA. And then it fails at the end of flashing the application. Maybe that was able to be deducted from the issue.  


  • Thanks for confirming. Could you also let me know what version of nrfutil and what arguments you use to generate the DFU package? I will try to see if I can replicate the problem here.

  • I just updated so I am using version 6.1.0 of nrfutil. 

    The command for generating the DFU pack is as follows:

    nrfutil pkg generate 
    --hw-version 10100 
    --application-version 1 
    --application app.hex 
    --bootloader-version 4
    --bootloader ../Bootloader/_build/bootloader_nrf52832_xxaa_s132.hex
    --softdevice ../SDK/components/softdevice/s132/hex/s132_nrf52_7.0.1_softdevice.hex
    --sd-id 0xCB
    --sd-req 0xCB,0xB7,0xAF,0xA5,0x9D
    --key-file ../private.key 
    full_dfu_package.zip

  • I have also tried with my previous version of nrfutil which i believe was 5.2.0

  • It happens just when it seems to be finished.

     As you may know, a full sd+bl+app upgrade is performed in two steps where DFU of the app can only start after DFU of the new SD and bootloader has been completed. So I'm wondering if you got the error while updating SD+BL or if it happened during the app update?

    I have debugged the bootloader and narrowed the issue down to happening in nrf_dfu_req_handler -> on_data_obj_write_request because s_dfu_settings.progress.data_object_size = 0

     Did you do the debugging on the original or the new bootloader? The new bootloader will take over handling of the DFU requests if you got to the app update..

    I did not manage to replicate the error when I tested DFU from SDK 15.2.0 to SDK 16.0.0 here on a 52 DK. I have included the files I used for this test if you want to go over and compare settings. I tested with nrfutil v6.1.0.

    dfu_from_SDK15_2_to_SDK16.zip

Related