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

FOTA with NB-IoT failing

Hi community

I'm trying to evaluate the possibilities of an application update over the air via NB-Iot. According to this post this should be possible.

I'm using the application_update example with the nRF9160-DK (B1).

The example works fine with LTE-M and is able to download the update.

In the prj.conf I changed the defaults for the fragment size (2048 B) and the network mode (LTE-M) to 512 B and NB-IoT by adding the following lines:

CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_512=y
CONFIG_LTE_NETWORK_MODE_NBIOT=y

The code compiles and the LTE Link does connect. It also connects to the server but then it fails with the error 116, see below:

*** Booting Zephyr OS build v2.6.99-ncs1  ***
HTTP application update sample started
LTE Link Connecting ...
LTE Link Connected!
Press Button 1 to perform application firmware update
I: Configuring socket timeout (30 s)
I: Connecting to hidden-url.com
I: Downloading: FOTA/app_update.bin [0]
E: Error in recv(), errno 116
E: Download client error
Received error from fota_download

Does anyone have an idea whats wrong here?

Thanks!

Simon

  • Hi Simon,

    Are you using the default iBasis SIM card? iBasis has no NB-IoT network coverage in Switzerland now. You may need to check with iBasis or local carrier to check the locol NB-IoT support.

    Best regards,

    Charlie

  • Hi Charlie,

    thanks for your answer.

    No, I'm not using the default iBasis SIM card. We have Swisscom IoT simcards running with both LTE-M and NB-IoT enabled.

    Best wishes,

    Simon

  • Hi Simon,

    Ok, have you tested the NB-IoT connection before? You can use nRF9160: Serial LTE modem or nRF9160: AT Client.

    If you can confirm there is no issue with the NB-IoT connection, please record the modem trace and share it with us for further analysis. 

    Best regards,

    Charlie

  • Hi Charlie

    Yes, I tested the NB-IoT connection before, but I doublechecked it with the AT Client sample and it works.

    I recorded the trace of two attempts. In the first attempt it failed before the download started. In the second attempt it failed after it downloaded the first two fragments. Log below:

    *** FIRST ATTEMPT ***
    
    *** Booting Zephyr OS build v2.6.99-ncs1  ***
    HTTP application update sample started
    LTE Link Connecting ...
    LTE Link Connected!
    Press Button 1 to perform application firmware update
    I: Configuring socket timeout (30 s)
    I: Connecting to hidden-domain.com
    I: Downloading: FOTA/app_update.bin [0]
    E: Error in recv(), errno 116
    E: Download client error
    Received error from fota_download
    
    
    *** SECOND ATTEMPT ***
    
    *** Booting Zephyr OS build v2.6.99-ncs1  ***
    HTTP application update sample started
    LTE Link Connecting ...
    LTE Link Connected!
    Press Button 1 to perform application firmware update
    I: Configuring socket timeout (30 s)
    I: Connecting to hidden-domain.com
    I: Downloading: FOTA/app_update.bin [0]
    I: Downloaded 512/167219 bytes (0%)
    I: Downloaded 1024/167219 bytes (0%)
    E: Error in recv(), errno 116
    E: Download client error
    I: MCUBoot image upgrade aborted.
    Received error from fota_download

    trace-2021-10-14T11-24-14.754Z.bin

    Thanks and best regards,

    Simon

  • Hi Simon,

    I convert your trace to pcapng and checked with wireshark. The last message is an LTE RCC Release command. Have you set the PSM or does your carrier have some keep link timeout parameters?

    NB-IoT has low speed and it may take a very long time to finish a FOTA downloading, this might exceed some time limits.

    Best regards,

    Charlie

Related