FOTA problems via nRF Cloud

We use nRF9160 with our board (with Serial LTE Modem 1.9.1).
We try to download SLM / Modem firmware via nRF Cloud and we ran into several problems/misunderstandings:
1) First, We cannot add any modem firmware to the bundle.
We received the message that we don't have permission to upload the modem.



2) Second: If we try to follow your instruction (from "FOTA_AT_commands.rst").
Having previously created the group, bundle, and update, we further waiting that something to happen (status of update: is progress), but nothing happened:



We suggest that the next step should be executed the next  AT#XFOTA=1,"<URL of .bin update file>" command.
But where and how we can get the URL address from the created update?

Below I have added a log of AT commands at this moment (We communicate with your module directly via UART TX / RX without our additional logic):

AT+CEREG=5

OK

AT+CFUN=1

OK

+CEREG: 2,"084D","00A52803",7

+CEREG: 5,"084D","00A52803",7,,,"11100000","11100000"

AT#XNRFCLOUD?

#XNRFCLOUD: 0,0,16842753,"50334e33-3135-42c3-80a9-1d170d1621d7"

OK

AT#XNRFCLOUD=1

OK

#XNRFCLOUD: 1,0

AT#XNRFCLOUD?

#XNRFCLOUD: 1,0,16842753,"50334e33-3135-42c3-80a9-1d170d1621d7"

OK

AT#XFOTA=6

#XFOTA: 3,1,353188,"0.0.0+0"

OK

Parents
  • Hi Stas,

    1) Only Nordic official MFW can be programmed into the nRF9160 modem, we have provided all the available MFW bundles on this page. You can create application FOTA bundle from this page. For example:

    2) Please test the nRF Cloud FOTA function with nRF9160: Asset Tracker v2 — nRF Connect SDK 2.2.0 documentation (nordicsemi.com), SLM does not have the implementation to support managing FOTA tasks from the nRF Cloud side.

    FOTA AT commands — nRF Connect SDK 2.2.0 documentation (nordicsemi.com) is not specifically related to nRF Cloud. You can trigger the device to download firmware generally from any remote HTTP/HTTPS file server and upgrade itself. The following samples explain how to use AWS to build this kind of file server and you can upload a firmware file and get the link from there.

    Ready
    AT#XFOTA=6
    
    #XFOTA: 3,1,296820,"0.0.0+0"
    
    OK
    
    AT+CFUN=1
    
    OK
    AT+CFUN?
    
    +CFUN: 1
    
    OK
    AT#XFOTA=1,"http://nrfconnectsdk.s3.eu-central-1.amazonaws.com/app_update.bin"
    
    #XFOTA: 1,1,-118
    
    ERROR
    AT#XFOTA=1,"http://nrfconnectsdk.s3.eu-central-1.amazonaws.com/app_update.bin"
    
    OK
    
    #XFOTA: 1,0,1
    
    #XFOTA: 1,0,2
    
    #XFOTA: 1,0,3
    
    #XFOTA: 1,0,4
    
    #XFOTA: 1,0,5
    
    #XFOTA: 1,0,6
    
    #XFOTA: 1,0,7
    
    #XFOTA: 1,0,8
    
    #XFOTA: 1,0,9
    
    #XFOTA: 1,0,10
    
    #XFOTA: 1,0,11
    
    #XFOTA: 1,0,13
    
    #XFOTA: 1,0,14
    
    #XFOTA: 1,0,15
    
    #XFOTA: 1,0,16
    
    #XFOTA: 1,0,17
    
    #XFOTA: 1,0,18
    
    #XFOTA: 1,0,19
    
    #XFOTA: 1,0,20
    
    #XFOTA: 1,0,21
    
    #XFOTA: 1,0,22
    
    #XFOTA: 1,0,23
    
    #XFOTA: 1,0,25
    
    #XFOTA: 1,0,26
    
    #XFOTA: 1,0,27
    
    #XFOTA: 1,0,28
    
    #XFOTA: 1,0,29
    
    #XFOTA: 1,0,30
    
    #XFOTA: 1,0,31
    
    #XFOTA: 1,0,32
    
    #XFOTA: 1,0,33
    
    #XFOTA: 1,0,34
    
    #XFOTA: 1,0,35
    
    #XFOTA: 1,0,37
    
    #XFOTA: 1,0,38
    
    #XFOTA: 1,0,39
    
    #XFOTA: 1,0,40
    
    #XFOTA: 1,0,41
    
    #XFOTA: 1,0,42
    
    #XFOTA: 1,0,43
    
    #XFOTA: 1,0,44
    
    #XFOTA: 1,0,45
    
    #XFOTA: 1,0,46
    
    #XFOTA: 1,0,47
    
    #XFOTA: 1,0,49
    
    #XFOTA: 1,0,50
    
    #XFOTA: 1,0,51
    
    #XFOTA: 1,0,52
    
    #XFOTA: 1,0,53
    
    #XFOTA: 1,0,54
    
    #XFOTA: 1,0,55
    
    #XFOTA: 1,0,56
    
    #XFOTA: 1,0,57
    
    #XFOTA: 1,0,58
    
    #XFOTA: 1,0,59
    
    #XFOTA: 1,0,61
    
    #XFOTA: 1,0,62
    
    #XFOTA: 1,0,63
    
    #XFOTA: 1,0,64
    
    #XFOTA: 1,0,65
    
    #XFOTA: 1,0,66
    
    #XFOTA: 1,0,67
    
    #XFOTA: 1,0,68
    
    #XFOTA: 1,0,69
    
    #XFOTA: 1,0,70
    
    #XFOTA: 1,0,71
    
    #XFOTA: 1,0,73
    
    #XFOTA: 1,0,74
    
    #XFOTA: 1,0,75
    
    #XFOTA: 1,0,76
    
    #XFOTA: 1,0,77
    
    #XFOTA: 1,0,78
    
    #XFOTA: 1,0,79
    
    #XFOTA: 1,0,80
    
    #XFOTA: 1,0,81
    
    #XFOTA: 1,0,82
    
    #XFOTA: 1,0,83
    
    #XFOTA: 1,0,85
    
    #XFOTA: 1,0,86
    
    #XFOTA: 1,0,87
    
    #XFOTA: 1,0,88
    
    #XFOTA: 1,0,89
    
    #XFOTA: 1,0,90
    
    #XFOTA: 1,0,91
    
    #XFOTA: 1,0,92
    
    #XFOTA: 1,0,93
    
    #XFOTA: 1,0,94
    
    #XFOTA: 1,0,95
    
    #XFOTA: 1,0,96
    
    #XFOTA: 1,0,98
    
    #XFOTA: 1,0,99
    
    #XFOTA: 1,0,100
    
    #XFOTA: 4,0
    AT#XRESET
    
    OK
    
    *** Booting Zephyr OS build v2.7.99-ncs1-17-gc3208e7ff49d  ***
    Flash regions           Domain          Permissions
    00 03 0x00000 0x20000   Secure          rwxl
    04 31 0x20000 0x100000  Non-Secure      rwxl
    
    Non-secure callable region 0 placed in flash region 3 with size 32.
    
    SRAM region             Domain          Permissions
    00 03 0x00000 0x08000   Secure          rwxl
    04 31 0x08000 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_EGU0             Non-Secure      OK
    22 NRF_EGU1             Non-Secure      OK
    23 NRF_EGU2             Non-Secure      OK
    24 NRF_EGU3             Non-Secure      OK
    25 NRF_EGU4             Non-Secure      OK
    26 NRF_EGU5             Non-Secure      OK
    27 NRF_DPPIC            Non-Secure      OK
    28 NRF_REGULATORS       Non-Secure      OK
    29 NRF_PDM              Non-Secure      OK
    30 NRF_I2S              Non-Secure      OK
    31 NRF_GPIOTE1          Non-Secure      OK
    
    SPM: NS image at 0x20200
    SPM: NS MSP at 0x200130a8
    SPM: NS reset vector at 0x25ed9
    SPM: prepare to jump to Non-Secure image.
    *** Booting Zephyr OS build v2.7.99-ncs1-17-gc3208e7ff49d  ***
    HTTP application update sample started
    Using version 2
    
    
    uart:~$ LTE Link Connecting ...
    LTE Link Connected!
    Press Button 1 or enter 'download' to download firmware update

    Best regards,

    Charlie

  • Hi ,
    I wanna clarify one moment. Now for the test update, we use the Programmer from nRF Connect for Desktop.
    And there, we always used the .hex file for updates.
    Can we just download the .hex file (firmware) from the Broker AWS URL, or required to prepare the .bin file for it?

Reply Children
  • Hi Stas,

    Stas Jis said:
    What about the modem firmware? 
    nRF9160: HTTP full modem  says that An external flash memory with minimum 4 MB of free space is required to perform a full modem update.
    But we are talking about updating through the nRF9160 DK, and we need to be able to update the modem firmware on our device.

    Yes, 4MB is a minimum requirement. You have to consider this requirement when you design your custom device if you need the full modem firmware update function.

    The cbor file is used for full modem update, which is where the size limitation comes from. bin files can be used for modem firmware delta updates, which is shown here nRF9160: HTTP modem delta update — nRF Connect SDK 2.2.0 documentation (nordicsemi.com)nRF9160: HTTP modem delta update — nRF Connect SDK 2.2.0 documentation (nordicsemi.com). You can find a previous discussion here.

    Stas Jis said:
    Can we just download the .hex file (firmware) from the Broker AWS URL, or required to prepare the .bin file for it?

    You should use bin file for firmware upgrading with MCUBOOT, and it is always provided by NCS when you build a project using MCUBOOT.

    Flash tools like JLink use Intel Hex images (.hex) instead of raw binary images (.bin) since the former include destination address information, when you upgrade firmware with MCUBOOT, the downloading library already knows the address of the image to store, so provide the raw binary image is enough.  The application raw binary images also have a smaller size compared with hex file which could be a merged image of several different images at different addresses, like mcuboot+tfm+application. 

    Best regards,

    Charlie

Related