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

Can DFU BLE service be used for data (not application) update?

Our products are based on nRF52832 & nRF52840 and include display.

We use DFU mechanism for application update.

According to Nordic's documentation DFU supports multi-application i.e. more than one application on flash memory.

Can we use the DFU service for updating separated data (non-application) sectors e.g. change languages files without updating application?

Thanks in advance 

  • You can, but it will naturally not work out of the box, i.e. you will need to modify the bootloader.

    I have used the DFU service to update a STM32 microprocessor through the NRF52. This allowed my device to support STM firmware updates over BLE.

    You can do whatever you want with the data you receive through the DFU service, you just need to figure out a mechanism to distinguish when data is meant to be used for an application update and when data is meant to be used for language file updates.

  • Correct if I am wrong, the difference shall be if in the end of the process the MBR shall be updated and the system shall be reboot?

    The data (language -  strings) is used by the application but we want to separate between the data and the application   and have the option to update one of them without changing the other.

  • I’m not sure what you mean with “language - strings”, but the point is that you can use the data provided on the DFU service as you please. The bootloader as shipped with the SDK takes whatever you send to it and puts it where the application is supposed to be.

    You can modify the bootloader to put the data elsewhere. You just need to differentiate when the data is supposed to be treated as an application update and when it’s supposed to be treated as a data update. 

  • Hi Yerry, 

    We do have an option to update only the application and leaving the application data intact. You can read about that here

    However, if you want to update only the data but not the application, it could be a little bit more complicated. 

    We until lately doesn't support this option yet. And the easiest way was to modify the bootloader to have one extra DFU option (beside application, softdevice, bootloader) to do data update. 

    In SDK 15.3 we have a new feature that mentioned in the release note here: 

    Added the option to send applications that will not be activated, but will remain in slot 1 ("external applications"). This functionality requires nrfutil version 5.0.0 or higher.

    Meaning it's possible to not activate the new image and leave it at bank 1. You then in your application can decide what to do with the image/data. How to generate a package for it is mentioned in the pc-nrfutil documentation at Note 3 here.

    Update packages of external applications, e.g. updates that are intended for a third party, can be generated by setting the --external-app option. When this option is set the receiving device will store the received update, but not activate it. Note: This functionality is experimental in the nRF5 SDK and not yet used in any examples.

Related