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

nrf9160 FOTA

I would like to add FOTA via HTTP to mqtt_simple example

please describe how to do that, and how to test the update

I know I need to add the following modules via configuration :

DFU_TARGET

download_client

what are the next steps? 

what code should I add, how can I perfrom the update command? how to fully test and activate that 

thank you

Parents
  • Hi,

    We already have some samples for FOTA via HTTP in NCS, the HTTP application updateHTTP full modem update, and HTTP modem delta update. These samples all use the FOTA download library to download a file from a remote server and either write it to flash or to the modem. Using this library simplifies the process, as the FOTA library uses the Download client library to download the image, and then the downloaded data is passed to the DFU target library, which identifies the image type and decides where to store the image depending on image type.

    I would recommend taking a look at the HTTP update samples to see how this is implemented there, and how to use the FOTA library, and use one of them as a starting point instead of the Simple MQTT sample. Each sample has a Testing part in the documentation, where you can find which steps to perform in order to test the samples.

    You can also check out the AWS FOTA sample, which shows how to to perform FOTA via MQTT and HTTP. The difference between this sample and the HTTP application update sample is that it also uses MQTT, and that the firmware download i triggered through an AWS IoT job. The MQTT part is simply to notify the device that a job is ready and to receive metadata for the update job, while the download itself is done over HTTP.

    Best regards,

    Marte

  • first of all thank you for the great direction, I have taken the example "http_application_update", managed to set the AWS bucket and it works great.

    now I have taken the project "simple MQTT" and tried integrating the http update in that, project compiles, but when download command is activated software gets stuck.

    the issue is in the prj settings

    can you please assist on one of the options:

    1. what is missing in those settings

    2. what are the minimum required settings for adding the HTTP project to the "simple HTTP" project

  • FOTA is now working, I have taken configuration and step by step from example, and it's working great!

Reply Children
Related