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

SDK 12.1.0 DFU service fails to perform firmware upgrade

I performed below mentioned steps:

  1. Downloaded SDK 12.1.0
  2. Soft Device s130_nrf51_2.0.1_softdevice.hex
  3. Built secure boot-loader with new public key
  4. Built project ble_app_hrs for pca10028 on Keil compiler with DFU service added.
  5. Downloaded Soft device and Boot-loader hex files through nrfConnect Programmer
  6. Generated DFU .zip package with below command line arguments: nrfutil.exe pkg generate --application application.hex --application-version 0xFFFFFFFF --hw-version 51 --sd-req 0x87 --key-file private.key %file_name%.zip
  7. Able to download DFU .zip package through nrfConnect mobile App
  8. .
  9. Able to connect to device successfully with DFU Service and DFU button visible .
  10. On attempting to perform DFU with same .zip file, App is stuck at "Starting Boot-loader" message and does not proceed further
  11. DFU is not done successfully.

Please help me resolve this issue.

Thanks,

Rahul

Parents
  • One think I observed is at the time addition of DFU service, I did not see event handler defined for DFU.

    Is it available or do I have write it on my own?

  • Hello,

    Did you try with the Buttonless DFU Template Application first before you started with the heart rate example? Note that it's not sufficient to just add the BLE DFU service, you also need to include nrf_dfu_flash_buttonless.c and nrf_dfu_settings.c as in the template example.

    Also, the DFU control point characteristic lacks the required write permission as noted in the SDK 12.3.0 release notes:

    To switch to DFU mode, you must write to the DFU control point.
    However, this characteristic is set as read only. Add the following

    code line to enable the write property: char_md.char_props.write = 1;
    For details, see https://devzone.nordicsemi.com/question/93414/sdk12-ble_app_buttonless_dfu/#95079 

  • I used the same nRF connect version on a Pixel 2 phone, but I didn't experience any problems. The phone automatically re-connected with the new app after completing the DFU. Could you try testing this again with the files attached below?

    Merged Softdevice, bootloader, template app from SDK 12.1.0:

    sd_bl_app_settings.hex

    DFU package for test:

    buttonless_app.zip

    1. Erased all flash
    2. Downloaded sd_bl_app_settings.hex
    3. Initiated DFU with buttonless_app.zip

    Same issue observed with files you shared

    What is behavior in your case?

  • Here are some screenshots I took. Note that I went back to the NORDIC_TEMPLATE tab in order to see the transfer plot while the update was ongoing. The last one is when the phone has disconnected from the bootloader re-connected to the new updated application.  

  • Although I assume that code is same that is available in the SDK folder, is it possible for you to share your code?

    I need to compare to spot any difference in the code we are working on.

  • In my case, boot-loader DFUTARG tab appears back on attempting to perform DFU operation.

Reply Children
No Data