Robust FOTA update, and error -11

Good afternoon,

I am trying to set up FOTA update over NB-IoT, my device is offline most of the time and connects only a few times a day.

1. What are the gudielines to develop a robust FOTA update implementation ? My current code is based on the Nordic FOTA sample.

2. Here is one error that happened to me, how to make sure it never happens again ?

[00:07:59.947,906] <err> download_client: Error in recv(), errno 11
[00:07:59.955,017] <err> fota_download: Download client error
[00:07:59.961,578] <inf> dfu_target_mcuboot: MCUBoot image upgrade aborted.
[00:07:59.969,177] <inf> dfu_target_mcuboot: MCUBoot image upgrade aborted.
[00:08:00.000,915] <err> nrf_cloud_transport: NRF_CLOUD_FOTA_EVT_ERROR
[00:08:00.008,239] <dbg> cloud_connection: cloud_event_handler: NRF_CLOUD_EVT_FOTA_ERROR
[00:08:00.023,712] <inf> cloud_connection: Reported FOTA failure: 0

Best regards

Bastien

Parents
  • Hi Bastien,

    What are the gudielines to develop a robust FOTA update implementation ?

    I would like to recommend some articles from the Memfault blog.

    If you manage to implement all of these recommendations, you'll probably have one of the best OTA update system that currently exists ;-)

    My current code is based on the Nordic FOTA sample.

    Which sample are you referring to ? We have multiple FOTA sample for different protocols and Cloud solutions.

    Here is one error that happened to me, how to make sure it never happens again ?

    You need to add more error handling. Robustness is not achieved by never having any errors, because that is impossible with cellular, you will always have one device which fails to download something somewhere. It is achieved by having a firmware which is capable of handling all the possible errors that can happen during an update.

    Here, in your case, it seems like the download failed for some reason. A possible way to handle this is to wait a little bit, and retry updating later. And maybe, if it fails more than a certain number of time, the device can report that he can't proceed with the update.

    Best regards,

    Simon D-M

Reply
  • Hi Bastien,

    What are the gudielines to develop a robust FOTA update implementation ?

    I would like to recommend some articles from the Memfault blog.

    If you manage to implement all of these recommendations, you'll probably have one of the best OTA update system that currently exists ;-)

    My current code is based on the Nordic FOTA sample.

    Which sample are you referring to ? We have multiple FOTA sample for different protocols and Cloud solutions.

    Here is one error that happened to me, how to make sure it never happens again ?

    You need to add more error handling. Robustness is not achieved by never having any errors, because that is impossible with cellular, you will always have one device which fails to download something somewhere. It is achieved by having a firmware which is capable of handling all the possible errors that can happen during an update.

    Here, in your case, it seems like the download failed for some reason. A possible way to handle this is to wait a little bit, and retry updating later. And maybe, if it fails more than a certain number of time, the device can report that he can't proceed with the update.

    Best regards,

    Simon D-M

Children
Related