This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU over cellular internet

Hi,

This is actually a followup ticket based on this: https://devzone.nordicsemi.com/f/nordic-q-a/56228/fota-dfu-over-internet.

Now the situation is a bit more concrete (or at least how I imagine the situation):

  1. I am using a cellular modem. This will be used to download a dfu package from a third party endpoint using AT commands.
  2. The dfu package will be copied to mcu (nrf52840) via UART, also using AT commands
  3. The mcu is rebooted and enters DFU mode (using the power management API). The bootloader activates the DFU image

Questions

  1. Is the above scenario even possible? What am I missing?
  2. Would the secure BLE bootloader be able to activate an image downloaded in this manner?
  3. Given the potential size of the dfu image - should the UART buffer be a large as possible?

Thanks 

Tim

  • NB: We are really short staffed due to Summer Holidays in Norway. You must expect some extra delay in technical questions these days, I am afraid. I am sorry for the inconvenience.

    I will get back to you as soon as I can, hopefully tomorrow.

  • 1. It is possible, but it requires that you have space for the current application and the new application at the same time in your flash. If you intend to do a softdevice update as well, which typically requires a new bootloader update, you need to fit 2xBL + 2xSD + 2xAPP in flash.

    2. Yes, but it requires you to do some changes to the bootloader. You need to find what function is called when the transfer of the image in the bootloader is normally done, and call that directly when you enter bootloader mode (if there is a new image present). Essentially you will skip the transfer part in the bootloader, because it is already done from the application.

    3. not necessarily. You transfer the image in the chunk size that you want to. You need to use your UART handler to stored the received chunks in the flash. It doesn't really matter what UART buffer size you use. You can transfer 8 bytes at the time if you want to, or you can transfer 512 bytes at the time.

    BR,

    Edvin

  • I recently bumped into "Bootloader for background DFU" in the experimental IoT libraries section. Could this also be used, and since it's experimental, how reliable is it?

  • It is experimental, and the IoT section was deprecated in the latest SDK (SDK17.0.0). It may work, but I am not familiar with it. 

  • Fair enough. I'm having trouble deciding where to start (there's quite a number of ways to go around this).

    Here's what I've gathered so far: 

    1. I will be transferring the image from the modem to the nrf52840 mcu via UART (within the application context). Would it then make sense to look at the UART version of the secure bootloader to get inspiration on how the image transfer is made via UART?
    2. In my application project, I need to include the DFU library, and initialize my chosen transport mechanism (UART). Would this potentially create a  conflict since the UART instance is already being used by the modem? - If this is a problem, I'm thinking one way around it is to move the whole DFU process to the bootloader (the application gets a notification that an update is available, restarts in DFU mode, and the bootloader initializes the transport + modem, transfer the image, validate and activate).
    3. I'm a little fuzzy about the concept of putting an image in bank 1. How does one go about that from an application context? Any examples that show this? And to be clear, when we say "image", we mean the DFU package created using nrfutil, yes?
Related