nRF Cloud FOTA

Hi, we are having problems using FOTA on nRF Cloud. We are using nRF Connect SDK V2.5.0 and the project is based of Asset Tracker V2 with FOTA enabled. On nRF Cloud we do the following:

  1. Made sure the device is in a group
  2. Create an update bundle and upload dfu_application.zip
  3. Create an update and select the group the devices belong to.

The firmware update only get queued for some of the devices. When it gets queued for a device, then the update is always reliable. But when nRF Cloud stops queueing a FOTA update to a device I am unable to get this to work easily again.

Sometimes assigning the device to a new group and then creating a new update for that group works. Yesterday I created a new group and when I try to create an update I get this error:

Can you please give us advice on how to make the FOTA updates more reliable?

  • Hello, 

    I have been assigned your ticket and will try to reproduce on my side. Hope to have an answer by end of today or tomorrow. 

    Kind regards,
    Øyvind

  • Hello, 
    I've tried to reproduce your issue, and the only difference is that there is no device connected to the update from what I can see from your screenshot. 

    Kind regards,
    Øyvind

  • Hi Øyvind

    Thank you for looking into this. I agree that it looks like nRF Cloud thinks there is no valid device in this group for the firmware. Currently my setup is:

    1. My device is in Group: "Hubert" and fota_v2 contains all the correct fields:

    2. In the dfu_application.zip file, manifest.json looks as follows:

    {
    "format-version": 0,
    "time": 1701747843,
    "files": [
    {
    "load_address": 196608,
    "version_MCUBOOT": "0.17.0+0",
    "type": "application",
    "board": "woods_nrf9160",
    "soc": "nRF9160_SICA",
    "size": 323287,
    "file": "app_update.bin",
    "modtime": 1701747842
    }
    ],
    "name": "wd_gps",
    "firmware": {
    "zephyr": {
    "revision": "62c4d11a3833c90bb095bc9c842b7fa9af29af5a-dirty"
    },
    "nrf": {
    "revision": "1fae141fc6713dd331b797fc96c90dc84552242d"
    }
    }
    }

    When the device is alone in a group then it gets rejected. When I put it in a group with other devices, then the firmware get queued for some of them, but not for my device.

    When I create the update, there is a message saying:

    What does nRF Cloud check to determine if the firmware is compatible with a device? To me it looks like my device fails a check somewhere and then nRF Cloud does not queue firmware updates to it.

    Thanks again for your help with this.

    Regards
    Hubert

  • Hello Hubert,

    You have one field with an incorrect value and one field missing, in your firmware's manifest.json file. From UploadFirmware in our REST API documentation:

    • 'format-version' should always be set to 1
    • fwversion is validated against this regular expression: /^[a-zA-Z0-9._-]{1,30}$/
    • The Zephyr build system produces dfu_application.zip in the build/zephyr folder, which contains a manifest.json plus the update binary. However, the manifest is currently generated without the required fwversion field, so you will need to add that field.
    • If you use the nRFCloud.com user interface to upload your zip file, you are given options to fill in the name, description, and fwversion fields. The UI will then properly generate the manifest.json file and zip file.

    Your manifest's format-version is 0, not 1.

    Your fwversion field is missing.

    Please update your manifest.json and re-upload your firmware.

    -Lincoln

  • Hi Lincoln

    Thank you for your help. I loaded app_update.bin instead of dfu_application.zip and I completed all the fields correctly as you advised. It queued the firmware update for all the devices in the group and it updated correctly.

    Regards

    Hubert

Related