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

AWS-FOTA Sample

Hi!

I'm trying to use the AWS-FOTA  sample, I flashed the sample onto the board and it connected to the AWS account successfully, but when I try to add the update.bin file to the job document it keeps giving me an error (file exceeds size limit). how can I fix this ? 

  

Parents
  • Hello,

    I see that you are responding but deleting your reply. Is this intentionally? 

    I've tried to replicate your issue but without luck. Since you are getting the error message in AWS, my concern is that you have configured something wrong in the Job Document. What does you job-file look like? It is not the update.bin that should be added to the job document, but a <your text>.json. 

    An example of a job file can be found in the documentation of the AWS FOTA library. You can upload it to an S3 bucket on your AWS account and select it from there. If you use the AWS IoT Console, this is the only way to add a job file to a custom job.
    As described in our documentation, the .json job file can be uploaded to AWS S3 bucket, and then selected in the job documentation. This is the template:

    {
      "operation": "app_fw_update",
      "fwversion": "v1.0.2",
      "size": 181124,
      "location": {
        "protocol": "http:",
        "host": "s3.amazonaws.com",
        "path": "/nordic-firmware-files/0943dfbf-cb10-4eb7-8277-a8b179eaf4ff"
       }
    }

    From AWS IoT click Manage --> Jobs --> Creat --> Create Custom Job. Now you can add the job-file (<your text>.json):

    The sample job-file (above and linked in our documentation) links to firmware.nrfcloud.com (AWS server), meaning you can choose to upload the update.bin to nRFCloud or to AWS S3 Bucket.

    This yields two possible locations to download from:

    • https://[YOUR-BUCKET].s3.eu-north-1.amazonaws.com/update.bin
    • s3.amazonaws.com/.../[YOUR FILE HASH]

    Note that using AWS address in <your text>.json should look like:

    {
      "operation": "app_fw_update",
      "fwversion": "v1.0.2",
      "size": 181124,
      "location": {
        "protocol": "https:",
        "host": "[YOUR-BUCKET].s3.eu-north-1.amazonaws.com",
        "path": "/update.bin"
       }
    }
    


    Let me know how that works for you!

    Kind regards,
    Øyvind

  • Thank you so much, I downloaded the file and it worked, but now it is showing that the job is in progress and nothing else 

  • Sorry, I do not know how AWS servers work, you will have to read the AWS IoT jobs user manual.

    Kind regards,
    Øyvind

  • Thank you, I jus need to know how the sample works, does it update as soon as I add the job, or do I need to reset the board? 

  • Hello, 

    I was able to reproduce your issue with status "In progress" after a download, and reboot. When I clicked inside the job it would say "In progress" even though I know it downloaded. Turns out I had to log out and log in again, it now shows Succeeded. 

    For every new .bin file that you want to upload to your board, you will have to generate a new job fil after the board shows "MQTT client connected". Make sure to remove any "Queued" jobs from the Jobs list.
    Let me know how this works for you.

    Kind regards, 
    Øyvind

  • Hi, I was able to set a job, but the download job doesn't start. The job status is always "in progress". I logged out and logged in and got the same result.

    I use the same region in AWS IoT and S3

    ***** Booting Zephyr OS v1.14.99-ncs2 *****
    The MQTT AWS Jobs FOTA Sample
    LTE Link Connecting ...
    LTE Link Connected!
    IPv4 Address 0x4980a023
    client_id: nrf-352656100218455
    [mqtt_evt_handler:131] MQTT client connected!
    [mqtt_evt_handler:196] SUBACK packet id: 2112
    [mqtt_evt_handler:186] PUBACK packet id: 62996

    Any help?

Reply
  • Hi, I was able to set a job, but the download job doesn't start. The job status is always "in progress". I logged out and logged in and got the same result.

    I use the same region in AWS IoT and S3

    ***** Booting Zephyr OS v1.14.99-ncs2 *****
    The MQTT AWS Jobs FOTA Sample
    LTE Link Connecting ...
    LTE Link Connected!
    IPv4 Address 0x4980a023
    client_id: nrf-352656100218455
    [mqtt_evt_handler:131] MQTT client connected!
    [mqtt_evt_handler:196] SUBACK packet id: 2112
    [mqtt_evt_handler:186] PUBACK packet id: 62996

    Any help?

Children
Related