nRF9160 modem firmware upgrade (programmatic)

I'm attempting to send OTA modem upgrades to the nRF9160, from v1.3.3 to 1.3.4 and then 1.3.5.  Our application code is built on nRF Connect SDK version 2.4.2.

So far I'm able to send the firmware image (1.3.3 to 1.3.4), and eventually restart the 9160 by calling sys_reboot(SYS_REBOOT_COLD).  When the micro comes back up I call nrf_modem_lib_init() followed by lte_lc_init().  The latter fails with the following:

00> [00:01:20.790,924] <err> lte_lc: Failed to get system mode, error: -1
00> [00:01:20.791,351] <err> lte_lc: Could not get current system mode, error: -14

I've found that after a power cycle the modem starts up and works normally, with the new modem firmware.

Can you please advise what are the proper steps to bring the new modem firmware online without a power cycle?  We have equipment in the field and they are inaccessible in many cases.

Thanks,

  Frog

Parents Reply
  • What library do you use for the upgrades?

    Regardless, when the update is scheduled (which library you use will dictate how you get to this point), you can call nrf_modem_lib_shutdown() and nrf_modem_lib_init() to reboot the modem (this would be your first reboot in your current implementation).

    If nrf_modem_lib_init() returns NRF_MODEM_DFU_RESULT_OK, you can call nrf_modem_lib_shutdown and nrf_modem_lib_init() again, to re-start the modem in "normal mode" (as opposed to bootloader mode). This would replace the second reboot.

    So two "reboots" are still necessary, but you only need to reboot the modem, and not the whole chip.

Children
No Data
Related