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

Secure DFU bootloader: application not starting

Hello,

I have a problem with secure bootloader. what I did:

  1. Flash SoftDevice 130 using nRFgo Studio.
  2. Compiling \examples\dfu\bootloader_secure\ (i removed the error regarding the key).
  3. Flashing the bootloader with Keil (using nrfjprog.exe for flashing).

Unfortunately, the bootloader seems not to run. There is no advertisement "DfuTarg". When I compile the buttonless dfu example and flash it with Keil, there is still no response. So the bootloader does not start the application. There are no debug messages over UART either.

However, when I flash the precompiled debug version (secure_dfu_secure_dfu_ble_s130_pca10028_debug.hex), the bootloader is advertising as "DfuTarg". When I load an application (using Keil or DFU with nrfConnect´), it does not leave the bootloader mode.

Can you tell me whats wrong?

Thank you!

Edit: I use SD130 on nRF51

  • @daniel: Please make sure you refresh Bluetooth (turn off and on) on the phone and remove pairing if any. As you can find in the source code of the example there is no HRM service declared. Are you using SDK v12 ?

  • I got it working now. There was a problem with my hardware abstraction, so there was always a dfu request. the application starts now. However, when I flash the buttonless example (SDK 12.2.0), there is a "Experimental Buttonless DFU Service" with a characteristic "Experimental Buttonless DFU". But there is no control point I can write to to start the bootloader. This control point does not appear when I use "enable services". Whats wrong now? I am so close to my goal :)

  • @mr91: You would need to add the write property to the characteristic. It's a bug in the buttonless example. Please see here

  • This is the further guide on IOS nRF Connect and nRF Toolbox to get the buttonless DFU triggered from the app. I got the buttonless DFU working finally.

    Thanks Hong Bui! Yes, my phone was cached on previous service and only able to see the DFU service after turning on & off the Bluetooth.

    Connect with the device "Nordice_Template" via IOS nRF Connect and discover the "Unknown Service".

    Unknown Service

    Click on the service to discover the "Unknown Characteristics". Click on the right button (3 parallel arrows down button) to enable the service.

    Unknown Char

    The button will turn into a cross out arrow down as below.

    Enabled Char Service

    Click arrow up button to write 0x01 to the characteristics

    Service enabled

    The value will change to 0x200101. The device will be disconnected and the nRF51 DK will light up the LED 3.

    image description

    Find the device advertised as "DfuTarg" in nRF Toolbox and select it as DFU target.

    image description

    Upload the buttonless DFU app .zip file.

    image description

  • Hi,

    I have the same problem on:

    pca10040 SD132 SDK v12.1.0 NRF52

    I have erased the dev board and programmed in the SD s132 v3.0.0 using nRFgo Studio. I built the bootloader_secure example (non-debug version in Keil 5 although I saw the same "error regarding the key" as above but defined NRF_DFU_DEBUG_VERSION in the project options to get the Public Key included)) and flashed it in (I tried nrfjprog and nRFgo Studio). The dev board does not advertise at the end of this sequence. LED 1 is not lit.

    I have also tried building the debug version of the example using IAR but with the same result.

    If I flash in the pre-built hex file examples\dfu\bootloader_secure\pca10040_debug\hex\secure_dfu_secure_dfu_ble_s132_pca10040_debug.hex then it advertises as DfuTarg as expected.

    Why does it not advertise when I follow the instructions and build the example from source?

    Thanks, Duncan Hurst

Related