DFU OTA - What is the right set of tools?

Hello folks,

I am working to implement a system for OTA DFU on the board Xiao BLE Sense, which I am validating first on an nRF52840-sdk.

The end goal of this project is a wearable device that will get occasional DFU updates to reflect new software features.

I've loaded up the examples on smp_svr, central_smp_client, and I've been experimenting with development on the nRF Desktop application, which documentation says has support for DFU.

I made two parallel versions of nrfDesktop with marginal (version number) changes. I loaded an application.zip of the "newer" version onto my (Android) phone, and tried to run a dfu via the Device Manager App > Image Tab > Firmware Upgrade > Select File process. I couldn't initiate the dfu process because DeviceManager claimed that the connected device wasn't running MCUBoot.

I can tell that I'm missing something, and I'd be grateful for guidance.

Right now, I'm trying to follow this example: ( nRF5 SDK v17.1.0 Secure DFU Hands-on Tutorial), but I'm stuck fairly early on trying to install micro-ecc.

My first concern is that in this tutorial, in step 5 (install ecc), is that infocenter displays a warning ("The current document displayed does not exist in the table of contents."). It makes me think that this procedure is somehow deprecated. Is this the case?

My second concern is that on the ecc download page (https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.1.0%2Flib_crypto_backend_micro_ecc.html&cp=8_1_3_11_16_2_2&anchor=lib_crypto_backend_micro_ecc_install), in step 4, the instructions specify to run a build_all.bat, which does not exist in their linked GitHub repository (https://github.com/kmackay/micro-ecc).

My questions in summary are:

What is the right set of tools to build DFU for my use case?

What is the right place to go and read about those tools?

Are there examples that I should refer to that use those tools?

Thank you for any advice you can provide, and happy new year.

Best,

    - Finn

  • Hi Hung,

    ----------------------------------------------------------

    UPDATE: SUCCESS!

    Using the Device Manager app instead of nRF DFU solved it.

    Bluetooth connect to my device > image tab at bottom > dfu_application.zip > Start > Successful update

    --------------------------- Here is what I attempted to get to this answer ------------------------------

    The app that I am using is as you specified: nRF Device Firmware Update app (nRF DFU).

    To install this (Android) I downloaded the nRF Toolbox app (v3.2.6), and from there the toolbox links to "Device Firmware Update -- Open DFU Application." This opens the app "nRF Device Firmware Update."

    I looked for a different version of nRF DFU on Google Play, but what I found is the same app as the Toolbox installed.

    I am using "nRF Device Firmware Update" app.

    -------------------------------------------------------------------------------------------------------------------------------

    For testing, I am building two versions of peripheral_lbs.

    I have the following two configs for those projects:

    Version 1: "OLDNAME"

    #
    # Copyright (c) 2018 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="Nordic_LBS_OLDNAME"
    
    # Enable the LBS service
    CONFIG_BT_LBS=y
    CONFIG_BT_LBS_POLL_BUTTON=y
    CONFIG_DK_LIBRARY=y
    
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_MCUMGR=y
    CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

    Version 2: "NEW NAME"

    #
    # Copyright (c) 2018 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="Nordic_LBS_NEW_NAME"
    
    # Enable the LBS service
    CONFIG_BT_LBS=y
    CONFIG_BT_LBS_POLL_BUTTON=y
    CONFIG_DK_LIBRARY=y
    
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_MCUMGR=y
    CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
    

    --------------------------------------------------------------------------------------------

    Here are the steps I am following (with screenshots of key steps).

    1. I pristine build Version 1.

    2. I erase and Flash Version 1 onto my Dev Kit

    3. I pristine build Version 2.

    4. I take the output file "dfu_application.zip" and transfer it to my phone

    5. On my phone, I open the app nRF Device Firmware Update

    6. Select File

    7. Select Device

    8. Click "Start"

    Log from nRF Logger:

    ------------------------------------------------------------------------

    Also, yes, I am following the link you sent (fota-update), but I'd like to point out a discrepancy between your advice and that tutorial. You mention that I should be using the nRF Connect DFU mobile app, but the instructions specifically call out using the nRF Connect Device Manager mobile app.

    --------------------------------------------------------------------------

    Thank you

        -  Finn

  • Hi Finn, 

    I'm glad that you got it work now. The nRF Connect DFU mobile app is like a Swiss Army knife it can do everything, including DFU update for both nRF5 SDK bootloader and NCS bootloader. I was suggesting the app because it was more versatile. But it's better to use the app dedicated for DFU as the source code is available and you have more option to configure the DFU update. 

    Please let us know if you have further question, or create a new ticket if you have a new issue. 

Related