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

About DFU version issue

I had some questions when using nRF5SDK160098a08e2\examples\dfu\secure_bootloader\pca10056_s140_ble for OTA test. Who can help me answer my question?

1. Can I return the FW to the old version using the OTA method?

2. What is the maximum version number supported for OTA?What happens if you reach this number?

3. Can the application, bootloader, softdevice version number saved in the bootloader settings file be read out by API function?

Thanks.

Best regards,
Devin

  • Hi, 

    1. Can I return the FW to the old version using the OTA method?

    (updated)

    Firmware version: If the image contains a bootloader, the image is accepted if the new firmware version is greater than (>) the existing version of the bootloader. If the image contains an application, the image is accepted if the new firmware version is greater than or equal to (>=) the existing version of the application. If the image contains a SoftDevice and no SoftDevice is already present, the fw_version is checked against the existing application's version to determine whether the update can overwrite it.

    Please see Acceptance rules for versions

    2. What is the maximum version number supported for OTA?What happens if you reach this number?

    You can list the SoftDevice well-known values with nRF-Command-Line-Tools by the following command: 

    nrfutil pkg generate --help

    If the latest version of softdevice is not on the list, you can update to the nRF-Command-Line-Tools to the latest version.  

    3. Can the application, bootloader, softdevice version number saved in the bootloader settings file be read out by API function?

     Please see Generating and displaying bootloader settings

    -Amanda H.

  • Hi Amanda,

    Thank you for your reply. I would like to know more about it.

    1. Do you mean the old version of Softdevice?

    a: Not only refers to SD, but also includes application and bootloader. e.g. I want to return application from version 2 to version 1. Because I see that there is a version check in the bootloader program, should the new version be greater than or equal to the old version?

    2. I mean when I use "application-version INTEGER", what is the maximum INTEGER?  Is 0xFF the maximum?

    3. Can I only get version by way of " nrfutil Settings display " command?

    Best regards,
    Devin

  • Hi,

    Devin Li said:
    should the new version be greater than or equal to the old version?

    The acceptance rules are copy/pasted from this Infocenter page. Please see this post

     

    Devin Li said:
    2. I mean when I use "application-version INTEGER", what is the maximum INTEGER?  Is 0xFF the maximum?

     Because app_version is uint32_t, the maximum INTEGER is 4,294,967,295‬ (0xFFFFFFFF‬)

     

    Devin Li said:
    3. Can I only get version by way of " nrfutil Settings display " command?

    Firmware version: The firmware version refers to either the bootloader version or the application version, depending on the transferred image. The current version numbers are stored in the bootloader settings page. The application version (nrf_dfu_settings_t::app_version) and the bootloader version (nrf_dfu_settings_t::bootloader_version) can be retrieved from the global variable.

    Note
    Note that the version numbers are erased and zero-initialized when the bootloader image is programmed. Therefore, after you first program the bootloader, you must generate a bootloader settings page with the current version numbers. See Bootloader Settings page and the nrfutil documentation for more information.

    See the Creating a firmware package with nrfutil

    -Amanda H.

Related