full modem firmware update at boot time

Hello,

Is there any way to perform full modem update installation during device boot or startup?

if yes, how to do it?

Best Regards


Praveen Deshmane 

Parents
  • Hello Praveen,

    Yes, this is possible and can be implemented in a few ways depending on your preferences.

    If you wish to integrate your own modem firmware update into your application, nRF9160: HTTP full modem update is a suitable starting point. Note that this implementation requires at least 4MB of external flash to work, as the modem firmware is stored in external flash before updating the modem. The sample uses a button press to initiate the updating process, and you can change the initiation method according to your preferences.

    If you combine this method with MCUboot, you have to change where the modem firmware resides in the external flash. My colleague has modified the sample to include MCUboot. Let me know if you are interested in this.

    Another way to implement DFU on startup is to use nRF9160: Full modem firmware update using SMP Server. This sample uses MCU manager and is a good starting point if you wish to use MCU manager for your project.

    Best Regards,
    Maria

Reply
  • Hello Praveen,

    Yes, this is possible and can be implemented in a few ways depending on your preferences.

    If you wish to integrate your own modem firmware update into your application, nRF9160: HTTP full modem update is a suitable starting point. Note that this implementation requires at least 4MB of external flash to work, as the modem firmware is stored in external flash before updating the modem. The sample uses a button press to initiate the updating process, and you can change the initiation method according to your preferences.

    If you combine this method with MCUboot, you have to change where the modem firmware resides in the external flash. My colleague has modified the sample to include MCUboot. Let me know if you are interested in this.

    Another way to implement DFU on startup is to use nRF9160: Full modem firmware update using SMP Server. This sample uses MCU manager and is a good starting point if you wish to use MCU manager for your project.

    Best Regards,
    Maria

Children
  • Hello Maria,

    Thank you for your time and reply.

    If you wish to integrate your own modem firmware update into your application, nRF9160: HTTP full modem update is a suitable starting point. Note that this implementation requires at least 4MB of external flash to work, as the modem firmware is stored in external flash before updating the modem. The sample uses a button press to initiate the updating process, and you can change the initiation method according to your preferences.

    I have already done this, i am using 4MB external flash for storing the modem update. I have followed the procedure from the below html document. I am successfully able to download full modem update and install the update immediately after the download. (I have modified a little, I am not using any button click to perform installation)

    Note: I am downloading modem update from AWS s3 bucket.  

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/http_update/full_modem_update/README.html

    My next goal is to perform full modem update installation during device bootup or startup not immediately after the download.

    If you combine this method with MCUboot, you have to change where the modem firmware resides in the external flash. My colleague has modified the sample to include MCUboot. Let me know if you are interested in this.

    Yes I am very interested. Kindly explain me how to combine this method with MCUboot. 

    Another way to implement DFU on startup is to use nRF9160: Full modem firmware update using SMP Server. This sample uses MCU manager and is a good starting point if you wish to use MCU manager for your project.

    I am not sure this can be used to perform FOTA (firmware over the air) updates.

    Thanks and regards

    Praveen Deshmane

  • Hello Praveen,

    Just letting you know that I am still looking into this, and will provide you with more help shortly.

    Kind Regards,

    Maria

  • Hello Maria, 

    Thank you for the reply.

    I will await for your help.

    Best Ragards

    Praveen Deshmane 

  • Hello Praveen,

    Praveen Deshmane said:
    I am not sure this can be used to perform FOTA (firmware over the air) updates.

    Your assumption is correct. I suggested the sample as a possibility before because it was not clear from your original that you were looking to use FOTA. We can disregard this sample going forward.

    Praveen Deshmane said:
    My next goal is to perform full modem update installation during device bootup or startup not immediately after the download.

    Ah, it seems I misunderstood your wishes on this as well. I missed the point that you did not want to download new modem firmware on boot, but only update.

    Adding a line: k_work_submit(&fmfu_work) in main() after the initialization is completed should start the work of performing the DFU without having to press a button.

    Because of the static partitioning, and the property that the external flash is configured as SPI NOR, this should be fine to do as long as there exists a modem firmware update in the external flash.

    Praveen Deshmane said:
    Yes I am very interested. Kindly explain me how to combine this method with MCUboot. 

    This is the sample that my colleague updated to include MCUboot: 294297_http_update_full_modem_update_ncs2_0_2.zip

    Note that the origin is from nRF Connect SDK (NCS) v2.0.2 and that it uses Secure Partition Manager instead of the default Trusted Firmware-M to manage the partitions. The reason for this is a bug which was fixed with the v2.1.0 release of NCS.

    Let me know if you would rather use TF-M over SPM, then I will take a closer look at the sample and modify it to use TF-M instead.

    Another note about the sample is that it contains a static partition layout in pm_static.yml. Here 0xf0000 is used as the slot size for MCUboot. This may need to change in your project.

    To find out where MCUboot should be placed to the following:

    1. Delete pm_static.yml
    2. Find the partition layout for your project in the generated build/partitions.yml
    3. Populate a new pm_static.yml with the partition layout you found in build/partitions.yml

    I hope you find this useful.

    Kind Regards,

    Maria

Related