How to reject old firmware version from AWS FOTA at NRF9160 side?

Hi Nordic team

Customer Delta was running a street lamp project.

For AWS FOTA, they applied a AWS account and firmware update already can work.

However, it looks like no version control ability. No matter new or old firmware from AWS,

NRF9160 accepted both.

How can we make it at NRF9160 side? Let NRF9160 reject older version update.

This project was from SDK Connect v1.3.0 http_application_update.

Jeffery

  • This is the struct used to store the image version (bootloader/mcuboot/boot/bootutil/include/bootutil/image.h):

    struct image_version {
        uint8_t iv_major;
        uint8_t iv_minor;
        uint16_t iv_revision;
        uint32_t iv_build_num;
    };
    

    The format is the following: maj.min.rev+build

    As you can see the major and minor fields are 1 byte long and can store numbers as large as 255. For the revision field (2 byte), the largest number you can store is 65536 and for build_num (4 bytes), the largest number you can store is 2^32.

    Be aware that I have not done any tests using large numbers, so you may want to test yourself first to be certain.

  • In your last reply, you replied to an answer I gave eariler, which placed your reply in the middle of the stack of replies, and made it not very easy to find. I provider a counter reply after your reply in the middle and copied it in here at the top as well, to make it more orderly and easier to find.


    This is the struct used to store the image version (bootloader/mcuboot/boot/bootutil/include/bootutil/image.h):

    struct image_version {
        uint8_t iv_major;
        uint8_t iv_minor;
        uint16_t iv_revision;
        uint32_t iv_build_num;
    };

    The format is the following: maj.min.rev+build

    As you can see the major and minor fields are 1 byte long and can store numbers as large as 255. For the revision field (2 byte), the largest number you can store is 65536 and for build_num (4 bytes), the largest number you can store is 2^32.

    Be aware that I have not done any tests using large numbers, so you may want to test yourself first to be certain.

  • *I had to enable these in mcuboot.conf, then "Unable to find bootable image.." went away

    CONFIG_PARTITION_MANAGER_ENABLED=y
    CONFIG_FLASH_MAP_CUSTOM=y

    is still needed even for NCS 1.9.1

Related