Full modem firmware update through UART

Hello, I am trying to update the modem firmware to v1.3.7 using UART using the nRF modem bootloader API. For context, I am running nrf-sdk 2.9.1 and also using the SLM application. I am following this documentation uses the API: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/bootloader.html and I have read through this documentation that references programming the MFW at a lower level: https://docs.nordicsemi.com/bundle/nan_041/page/APP/nan_production_programming/modem_update.html 

At a high level, I am trying to utilize a custom AT command that uses a datamode to pipe data from UART into the nRF modem bootloader API calls for writing the firmware segments to be used for updating the modem firmware. I have all of these path set up, however I have a few questions about the update process.

  1. Do the API calls from nrf_modem_bootloader use the underlying processes as described in the Production Programming: Modem Update documentation? For example, I am unsure what of what needs to be written when using nrf_modem_bootloader_fw_write(). Is the source address more so an offset that knows where to write the information to? I noticed in the Production Programming: Modem Update documentation, it states to write the contents to 0x2000001C + offset, but I am unsure if that is handled within the call or not. 
  2. What source content should be used in nrf_modem_bootloader_fw_write()? I initially attempted to write the entire mfw_nrf9160_1.3.7.zip to the file, but I read in the Production Programming: Modem Update documentation that it should be the segments listed as firmware.update.image.segments.[n].hex?
  3. The Production Programming: Modem Update documentation also has sections on 1) Setting up the device 2) Reading the modem key digest and 3) Programming the modem firmware loader. Are these steps also handled in the nrf_modem_lib_bootloader_init() call or will I need to set these procedures manually?
  4. Is programming the modem firmware loader different from programming the bootloader? 
  5. Is it required to update the modem bootloader using nrf_modem_bootloader_bl_write()? Or can we update the modem without updating?
  6. Are there any fail safes against incorrectly programming the bootloader, such as being able to recover the bootloader?

With some of these questions I'd also like to consider programming the MFW delta as instead. We are currently at modem firmware 1.3.5. I have taken a look at the API required to program using the mfw_nrf9160_update_from_1.3.5_to_1.3.6.bin, and have been getting a NRF_ENOENT (2) error when calling nrf_modem_delta_dfu_write(). When calling nrf_modem_delta_dfu_write(), can we make multiple calls to send small segments of the mfw_nrf9160_update_from_1.3.5_to_1.3.6.bin or does this have to be all at once?

Please let me know if you have any questions about my questions. Thanks!

Ben

Related