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

DFU

Hi, I am developing the application in nRF52832 with SDK_16 in SES.

I have a problem with DFU

I need to run the application and DFU has to be activate only if the mobile application gives permission

I have seen that Two method in DFU

Button DFU

Buttonless DFU

Is Buttonless DFU as same as Background DFU or both are different

I have done Button DFU.

But while running Buttonless DFU for my application. the application doesn't work. i don't know how to debug my application

  • Is Buttonless DFU as same as Background DFU or both are different

     Buttonless DFU means that you can trigger the nRF52xxx device to enter bootloader mode by writting to one of the characteristics in the DFU service. The nRF52xxx will then reset into the bootloader and  the bootloader that receives the new firmware image and when the entire image is received it will replace the old image with the new one. In other words, the 

    Background DFU is different. Here its the application that receives the new firmware image while it is continuing to perform the regular application tasks. Once the entire firmware image has been received the nRF52xxx will reset into bootloader mode and replace the old application with the new one. 

    So the main difference is that with regular buttonless DFU the device will not function as "normal" when the firmware image is being received, but if the update is done in the background in the application, i.e. Background DFU, then the only downtime will be the time it takes to replace the old application with the new one. 

    I have done Button DFU.

    But while running Buttonless DFU for my application. the application doesn't work. i don't know how to debug my application

    Are you using the _debug version of the bootloader as suggested by my colleague in https://devzone.nordicsemi.com/f/nordic-q-a/51844/ble_app_buttonless_dfu-my-application

     Please describe in detail what that is not working with your application. Are you not able to perform DFU? Doesnt the nRF52xxx device enter the bootloader when you write to the DFU characteristic? Do you get an error when you try to perform DFU?

    Best regards

    Bjørn

  • Hi,

    i need your opinion that, i need to do DFU

        In Button DFU - Works, but the problem is after sleep when it wake up with button press it enter into DFU mode (note: device has one button)

      Buttonless DFU and Background DFU as different means . and code reference for background DFU. 

    If the device is Fitness tracker (Health care product) which one you suggest  Button DFU or Buttonless DFU  or Background DFU.

    I tried to implement Buttonless DFU to BLE_UART or BLE_Blinky  it has build but the problem

    But after successive upload into the device it doesn't work.

    do you have any BLE_UART_DFU code (buttonless)  reference .

  • Sunil vignesh said:
    If the device is Fitness tracker (Health care product) which one you suggest  Button DFU or Buttonless DFU  or Background DFU.

     I would recommend the Buttonless DFU solution.

     

    Sunil vignesh said:

    I tried to implement Buttonless DFU to BLE_UART or BLE_Blinky  it has build but the problem

    But after successive upload into the device it doesn't work.

     Can you provide a detailed description on how you added the DFU service to the BLE_UART and BLE_Blinky applications? By upload to you mean flashing the application code with the DFU service added ? Or do you mean that you were able to perform DFU, but the application did not start after the DFU finished?

    If its the latter, then please provide the log output from the bootloader ( make sure that you use the debug version of the bootloader in our SDK) as well as the logs from the nRF Connect mobile app if you are using this to perform the update. 

    Best regards

    Bjørn

  • Hi,

    I tried to implement BLE_UART_DFU.

    in process i got stuck in nrfutil settings generate.

    I am using SDK_16

    but in settings generate is upto SDK_15.3.0. i am using nrfutil 6.0.1

    D:\HEXFILE>nrfutil settings generate --help
    Usage: nrfutil settings generate [OPTIONS] HEX_FILE
    
    Options:
      --family [NRF51|NRF52|NRF52QFAB|NRF52810|NRF52840]
                                      nRF IC family: NRF51 or NRF52 or NRF52QFAB
                                      or NRF52810 or NRF52840  [required]
      --application TEXT              The application firmware file. This can be
                                      omitted ifthe target IC does not contain an
                                      application in flash.Requires --application-
                                      version or --application-version-string.
      --application-version INTEGER   The application version.
      --application-version-string TEXT
                                      The application version string, e.g.
                                      "2.7.31". Will be converted to an integer,
                                      e.g. 207031.
      --bootloader-version INTEGER    The bootloader version.  [required]
      --bl-settings-version INTEGER   The Bootloader settings version.Defined in
                                      nrf_dfu_types.h, the following apply to
                                      released SDKs:
                                      |SDK12.0.0 - SDK15.2.0|1|
                                      |SDK15.3.0 -          |2|  [required]
      --start-address INTEGER         Custom start address for the settings page.
                                      If not specified, then the last page of the
                                      flash is used.
      --no-backup                     Do not overwrite DFU settings backup page.
                                      If not specified, than the resulting .hex
                                      file will contain a copy of DFU settings,
                                      that will overwrite contents of DFU settings
                                      backup page.
      --backup-address INTEGER        Address of the DFU settings backup page
                                      inside flash. By default, the backup page
                                      address is placed one page below DFU
                                      settings. The value is precalculated based
                                      on configured settings address
                                      (<DFU_settings_address> - 0x1000).
      --app-boot-validation [NO_VALIDATION|VALIDATE_GENERATED_CRC|VALIDATE_GENERATED_SHA256|VALIDATE_ECDSA_P256_SHA256]
                                      The method of boot validation for
                                      application.
      --sd-boot-validation [NO_VALIDATION|VALIDATE_GENERATED_CRC|VALIDATE_GENERATED_SHA256|VALIDATE_ECDSA_P256_SHA256]
                                      The method of boot validation for
                                      SoftDevice.
      --softdevice FILE               The SoftDevice firmware file. Must be given
                                      if SD Boot Validation is used.
      --key-file FILE                 The private (signing) key in PEM format.
                                      Needed for ECDSA Boot Validation.
      --help                          Show this message and exit.
    

    D:\HEXFILE>nrfutil settings generate --family NRF52 --application ble_app_uart_dfu.hex --application-version 0 --bootloader-version 0 --ble-settings-version 2 bl_setting.hex
    Usage: nrfutil settings generate [OPTIONS] HEX_FILE
    Try "nrfutil settings generate --help" for help.
    
    Error: no such option: --ble-settings-version

Related