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

  • Thanks for your reply. In fact it would be great to use DFU to transfer even the first appliation. This is what I did:

    1. Erase device
    2. Program SD130 using nRFgo Studio
    3. Compile the bootloader with my own keyfile (created out of priv.pem)
    4. Flashing the bootloader (device is then advertising as "DfuTarg"
    5. Compiling my application
    6. Copying the generated Hexfile (app.hex) to the nrfutil folder
    7. Running nrfutil with: 
    nrfutil.exe pkg generate --application app.hex --key-file priv.pem --hw-version 51 --sd-req 0x67,0x80,0x87 --application-version 0x02 output.zip
    8. Transfering output.zip to my mobile phone
    9. Connecting to "DfuTarg" in nRF Connect app
    10. Choosing "DFU" in the upper right corner
    11. Choosing the file "output.zip"
    12. Progress is displayed as graph
    13. After "Disconnecting" is shown in the app, the device is still advertising as "DfuTarg", not running my application
    

    Can you tell me whats wrong?

    Edit: Also tried it with nRF Toolbox, same result (progress is completed, still advertising as DfuTarg). Also tried to create a bootloader settings file and merged it with the application, then same process with nrfutil as above. In that case, the bootloader does not accept the file in the first place (no progress is shown in apps, immediate disconnecting after connection is established).

    Edit: I performed all above steps with SDK V12.2 (since bootloader was not advertising in 12.1)

  • Hi Mr91,

    All your steps looked fine. I need to see the log when you do DFU. You can find the log by openning nRFLogger.

    Also if you have a sniffer trace it would be useful.

    You can also turn off optimization in the project option, re-flash the bootloader and enter debug mode, then you can step into the code of the bootloader and check why the application is not started after you do DFU.

  • I followed mr91's steps above and was able to boot into "Nordic_Template" advertised in IOS nRF Connect. I was using nRF51 DK PCA10028 SDK 12.2 secure bootloader and experimental buttonless DFU. However, I am not able to find the DFU Service within "Nordic_Template" services. I wanted to perform a buttonless OTA DFU via the app by using nRF Toolbox again. How to make it happen?

  • Hi daniel,

    Thanks for verifying the process from Mr91.

    Regarding your question, you can have a look at this example \examples\ble_peripheral\experimental_ble_app_buttonless_dfu to know how to switch to bootloader. The documentation is here.

    Note that it's experimental and we may change that in the furture. But it's simply a demonstration on how to switch to bootloader.

  • Hi Hung Bui, I have read that many times. I am using IOS nRF Connect instead of Master Control Panel stated there. I cannot see "Nordic_Buttonless", but only "Nordic_Template". I don't see DFU Service, except battery service, device info, HRM service. There is not Control Point that I can write to.

Related