This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF9160 Delta and Full Modem FOTA using LwM2M carrier Library issues

Hello,

I have successfully achieved the modem delta firmware update from mfw_nrf9160_1.2.7 to mfw_nrf9160_1.2.7-FOTA-TEST, vice-versa with sample code. But when it comes in combination with LwM2M carrier lib then I can see the nRF9160 is getting reset 2 times. I know we can not call nrf_modem_lib_init() mentioned in Requirements and application limitations for LwM2M carrier but how to overcome that problem? As it is necessary step to confirm whether Modem FOTA update is success or failed.

Console Logs: 

*** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
Flash regions           Domain          Permissions
00 01 0x00000 0x10000   Secure          rwxl
02 31 0x10000 0x100000  Non-Secure      rwxl

Non-secure callable region 0 placed in flash region 1 with size 32.

SRAM region             Domain          Permissions
00 07 0x00000 0x10000   Secure          rwxl
08 31 0x10000 0x40000   Non-Secure      rwxl

Peripheral              Domain          Status
00 NRF_P0               Non-Secure      OK
01 NRF_CLOCK            Non-Secure      OK
02 NRF_RTC0             Non-Secure      OK
03 NRF_RTC1             Non-Secure      OK
04 NRF_NVMC             Non-Secure      OK
05 NRF_UARTE1           Non-Secure      OK
06 NRF_UARTE2           Secure          SKIP
07 NRF_TWIM2            Non-Secure      OK
08 NRF_SPIM3            Non-Secure      OK
09 NRF_TIMER0           Non-Secure      OK
10 NRF_TIMER1           Non-Secure      OK
11 NRF_TIMER2           Non-Secure      OK
12 NRF_SAADC            Non-Secure      OK
13 NRF_PWM0             Non-Secure      OK
14 NRF_PWM1             Non-Secure      OK
15 NRF_PWM2             Non-Secure      OK
16 NRF_PWM3             Non-Secure      OK
17 NRF_WDT              Non-Secure      OK
18 NRF_IPC              Non-Secure      OK
19 NRF_VMC              Non-Secure      OK
20 NRF_FPU              Non-Secure      OK
21 NRF_EGU1             Non-Secure      OK
22 NRF_EGU2             Non-Secure      OK
23 NRF_DPPIC            Non-Secure      OK
24 NRF_REGULATORS       Non-Secure      OK
25 NRF_PDM              Non-Secure      OK
26 NRF_I2S              Non-Secure      OK
27 NRF_GPIOTE1          Non-Secure      OK

SPM: NS image at 0x10000
SPM: NS MSP at 0x2001ab20
SPM: NS reset vector at 0x13489
SPM: prepare to jump to Non-Secure image.
*** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
HTTP delta modem update sample started
Initializing modem library
Initialized modem library
Current modem firmware version: mfw_nrf9160_1.2.7
Delta Modem FOTA update Started...
LTE Link Connecting ...
LTE Link Connected!
I: Configuring socket timeout (30 s)
I: Connecting to hermes-device-firmware.s3.amazonaws.com
I: Downloading: mfw_nrf9160_update_from_1.2.7_to_1.2.7-FOTA-TEST.bin [0]
I: Downloaded 2048/13942 bytes (14%)
I: Modem DFU Socket created
I: Modem firmware version: 20059fb4-0ad6-4128-8e96-f3d348e219c8
I: Downloaded 4096/13942 bytes (29%)
I: Downloaded 6144/13942 bytes (44%)
I: Downloaded 8192/13942 bytes (58%)
I: Downloaded 10240/13942 bytes (73%)
I: Downloaded 12288/13942 bytes (88%)
I: Downloaded 13942/13942 bytes (100%)
I: Download complete
I: Scheduling modem firmware upgrade at next boot
*** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
Flash regions           Domain          Permissions
00 01 0x00000 0x10000   Secure          rwxl
02 31 0x10000 0x100000  Non-Secure      rwxl

Non-secure callable region 0 placed in flash region 1 with size 32.

SRAM region             Domain          Permissions
00 07 0x00000 0x10000   Secure          rwxl
08 31 0x10000 0x40000   Non-Secure      rwxl

Peripheral              Domain          Status
00 NRF_P0               Non-Secure      OK
01 NRF_CLOCK            Non-Secure      OK
02 NRF_RTC0             Non-Secure      OK
03 NRF_RTC1             Non-Secure      OK
04 NRF_NVMC             Non-Secure      OK
05 NRF_UARTE1           Non-Secure      OK
06 NRF_UARTE2           Secure          SKIP
07 NRF_TWIM2            Non-Secure      OK
08 NRF_SPIM3            Non-Secure      OK
09 NRF_TIMER0           Non-Secure      OK
10 NRF_TIMER1           Non-Secure      OK
11 NRF_TIMER2           Non-Secure      OK
12 NRF_SAADC            Non-Secure      OK
13 NRF_PWM0             Non-Secure      OK
14 NRF_PWM1             Non-Secure      OK
15 NRF_PWM2             Non-Secure      OK
16 NRF_PWM3             Non-Secure      OK
17 NRF_WDT              Non-Secure      OK
18 NRF_IPC              Non-Secure      OK
19 NRF_VMC              Non-Secure      OK
20 NRF_FPU              Non-Secure      OK
21 NRF_EGU1             Non-Secure      OK
22 NRF_EGU2             Non-Secure      OK
23 NRF_DPPIC            Non-Secure      OK
24 NRF_REGULATORS       Non-Secure      OK
25 NRF_PDM              Non-Secure      OK
26 NRF_I2S              Non-Secure      OK
27 NRF_GPIOTE1          Non-Secure      OK

SPM: NS image at 0x10000
SPM: NS MSP at 0x2001aa60
SPM: NS reset vector at 0x133d1
SPM: prepare to jump to Non-Secure image.
*** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
HTTP delta modem update sample started
Initializing modem library
Modem firmware update successful!
Modem will run the new firmware after reboot
*** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
Flash regions           Domain          Permissions
00 01 0x00000 0x10000   Secure          rwxl
02 31 0x10000 0x100000  Non-Secure      rwxl

Non-secure callable region 0 placed in flash region 1 with size 32.

SRAM region             Domain          Permissions
00 07 0x00000 0x10000   Secure          rwxl
08 31 0x10000 0x40000   Non-Secure      rwxl

Peripheral              Domain          Status
00 NRF_P0               Non-Secure      OK
01 NRF_CLOCK            Non-Secure      OK
02 NRF_RTC0             Non-Secure      OK
03 NRF_RTC1             Non-Secure      OK
04 NRF_NVMC             Non-Secure      OK
05 NRF_UARTE1           Non-Secure      OK
06 NRF_UARTE2           Secure          SKIP
07 NRF_TWIM2            Non-Secure      OK
08 NRF_SPIM3            Non-Secure      OK
09 NRF_TIMER0           Non-Secure      OK
10 NRF_TIMER1           Non-Secure      OK
11 NRF_TIMER2           Non-Secure      OK
12 NRF_SAADC            Non-Secure      OK
13 NRF_PWM0             Non-Secure      OK
14 NRF_PWM1             Non-Secure      OK
15 NRF_PWM2             Non-Secure      OK
16 NRF_PWM3             Non-Secure      OK
17 NRF_WDT              Non-Secure      OK
18 NRF_IPC              Non-Secure      OK
19 NRF_VMC              Non-Secure      OK
20 NRF_FPU              Non-Secure      OK
21 NRF_EGU1             Non-Secure      OK
22 NRF_EGU2             Non-Secure      OK
23 NRF_DPPIC            Non-Secure      OK
24 NRF_REGULATORS       Non-Secure      OK
25 NRF_PDM              Non-Secure      OK
26 NRF_I2S              Non-Secure      OK
27 NRF_GPIOTE1          Non-Secure      OK

SPM: NS image at 0x10000
SPM: NS MSP at 0x2001aa60
SPM: NS reset vector at 0x133d1
SPM: prepare to jump to Non-Secure image.
*** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
HTTP delta modem update sample started
Initializing modem library
Initialized modem library
Current modem firmware version: mfw_nrf9160_1.2.7-FOTA-TEST
LTE Link Connecting ...
LTE Link Connected!

As we want to perform FOTA updates from device application side and don't want to be dependent on Verizon for the same. Kindly, support me how to perform modem FOTA updates with LwM2M carrier from our application side?

NCS version : 1.6.0

Modem Firmware version: 1.2.7

Device Revision : NRF9160_xxAA_REV2

Board Version : PCA10090

Thank you !

Regards,

Chetan

  • Hi Chetan,

    The nRF9160: Asset Tracker — nRF Connect SDK 1.6.0 documentation (nordicsemi.com) supports FOTA from either Lwm2m Carrier or AWS server. You can refer to this sample for your application.

    Best regards,

    Charlie

  • Hi  ,

    I know in asset tracker we have the modem FOTA support implemented using Lwm2m Carrier or AWS server. Here my questions are

    1. Can we perform modem FOTA update from AWS while LwM2M carrier Lib is present in the application ?

    2. Do we need to use either of them in the application to perform modem FOTA ?

    Note: If I do not integrate LwM2M carrier lib in my application then I can perform modem FOTA using AWS without any issues and the logs are already shared while creating the ticket.  

    Thank you !

    Regards,

    Chetan

  • Hi Chetan,

    Chetan Kale said:
    1. Can we perform modem FOTA update from AWS while LwM2M carrier Lib is present in the application ?
    I am not sure what you mean 'present' here. The Carrier library sends an event when it is about to begin to do FOTA. It is safe action as long as the application is not trying to FOTA after having received the Carrier library event indicating it is about to start FOTA by itself.

    Chetan Kale said:
    2. Do we need to use either of them in the application to perform modem FOTA ?

    Yes, use one of them at one time to avoid conflict action to MFW.

    Best regards,

    Charlie

  • Hi Chetan,

    Chetan Kale said:
    1. Can we perform modem FOTA update from AWS while LwM2M carrier Lib is present in the application ?
    I am not sure what you mean 'present' here. The Carrier library sends an event when it is about to begin to do FOTA. It is safe action as long as the application is not trying to FOTA after having received the Carrier library event indicating it is about to start FOTA by itself.

    Chetan Kale said:
    2. Do we need to use either of them in the application to perform modem FOTA ?

    Yes, use one of them at one time to avoid conflict action to MFW.

    Best regards,

    Charlie

  • Hi Charlie, 

    I have solved this issue by using nrf_modem_lib_shutdown() once the Modem firmware update successful!. Because LwM2M carrier also initializing the modem lib in NORMAL MODE which I have cross checked in lwm2m_os.c which was creating issues for our application to run after modem firmware update and hence 2 times reset were happening. 

    Thanks for your support. 

    Regards,

    Chetan

Related