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

Softdevice update through DFU

My current hardware is based on SoftDevice SD132, v6.0.0 as provided with SDK 15.0.0. I would like to update it to use SoftDevice 6.1.0 (as part of SDK 15.2.0) and perhaps later even to an S332 once it becomes available. The ZIP files we produce for updating are not accepted in the existing hardware (based on SDK15 + SD132 v6.0.0) when it is build for SDK15.2 + SD1432 v.6.1.0). Can this be done through the air using nRF Connect for windows? 

  • Hi Joost, 

    You should be able to update the nRF52832 firmware from SDK v15.0.0 and SD v6.0.0 to SDK v15.2.0 and SD v6.1.0 by performing a SD+BL+APP DFU update. Which version of nrfutil are you using to generate the new ZIP files used for the DFU? Also how are you generating them? ( please post the commands)

    You should be able to update the nRF52832 using the nRF Connect app on a Android/iOS device or  using nRF Connect for Desktop. 

    Best regards

    Bjørn 

  • Hi Bjørn,

    I build my bootloader project and application the usual way. Than (we use busybox to provide a UNIX-like shell, so this is a bash script):

    #!/bin/bash
    # This script builds a DFU'able zip for the project mentioned at the commandline
    
    FLAGS="--family NRF52"
    SOFTDEVICE=components/softdevice/s132/hex/s132_nrf52_6.1.0_softdevice.hex
    SDNUM=0xAF
    PROJNAME=$1
    CURDIR=`pwd`
    
    if [ ! -e _build/$PROJNAME.hex ]
    then
        echo $PROJNAME.hex not found, building...
        iarbuild.exe $PROJNAME.ewp "*"
    fi
    
    if [ ! -e ../dfu/BootLoader/_build/BootLoader.hex ]
    then
        echo bootloader not found, building...
        cd ../dfu/BootLoader
        iarbuild BootLoader.ewp "*"
        cd $CURDIR
    fi
    
    cd ../keys
    ../tools/nrfutil.exe pkg generate --hw-version 52 --sd-req $SDNUM --application-version 1 --application "$CURDIR/_build/$PROJNAME.hex" --key-file private.pem  "$CURDIR/_build/$PROJNAME.zip"
    cd $CURDIR
    

    nRF util version:

    $ nrfutil -v version
    nrfutil version 3.4.0
    2018-11-05 11:04:17,769 PyPi URL: https://pypi.python.org/pypi/nrfutil
    
    $ 

    Regards,
    Joost

  • Hi Joost, 

    the nrfutil version and the --options used to generate the Zip looks good. Which error do you get when you try to perform the DFU update  from SDK v15.0.0 and SD v6.0.0 to SDK v15.2.0 and SD v6.1.0 using nRF Connect? Could you also try to use the debug version of the bootloader and post the log output(via UART or RTT)? It would be very helpful in pinpointing where the update is rejected. 

    Best regards

    Bjørn 

  • The exact message is:

    When writing 'EXECUTE' command to Control Point Characteristic of DFU Target: Operation code 4 (EXECUTE) failed on DFU Target. Result code 11 (EXTENDED_ERROR) Extended error code 7 (SD_VERSION_FAILURE)

    As for the debug version of the bootloader, I'll need a bit more time since libraries have moved and changed paths and some macro's have been added since SDK_config 15.0.

    Hold on... you just may have pointed me to a possible failure on our side. How can it be the bootloader project compiles with settings that should have been added but aren't? Hmm... I'll get back on this once I have everything built in debug. Am I being bitten once more with silent updates in sdk_config that have not been documented properly?

    Regards,
    Joost

  • HI Joost, 

    if your're performing a SD+BL+APP update then the update is split into a SD+BL update (current application is deleted) followed by a APP update. This means that you need to specify the SoftDevice version that is present on the device prior to the update as the -sd-req and then set the --sd-id to the new SoftDevice version that is present in the DFU package, which will be used for the APP update. See note 2 under Usage in the REadme.md on https://github.com/NordicSemiconductor/pc-nrfutil.

    So in your case you need create the Zip package with the following options

    nrfutil.exe pkg generate --hw-version 52 --sd-req 0xA8 --sd-id 0xAF --application-version 1 --application "$CURDIR/_build/$PROJNAME.hex" --key-file private.pem  "$CURDIR/_build/$PROJNAME.zip"

    Best regards

    Bjørn

Related