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

The nRF52832 chip and SDK12.3.0 implement the buttonless DFU function.

The nRF52832 chip and SDK12.3.0 implement the buttonless DFU function.

First, as you are guided by the DK board, you have already completed the tutorial.

I tried to run it in the source of my project,
My project device is stopped during the initial setup of the application and it seems to run in bootloader mode.

In my project, I did not call the bootloader mode setting function, but only added the header file and C file.

I want to know the exact reason for this and how to solve it.

Why do I enter this mode when I did not call the bootloader mode function?

 

bootloader mode is running but not advertising.
I'm guessing now that my device's state is bootloader mode, but I'm not sure.

Softdevice & firmware all delete picture

Softdevice & firmware all delete picture

Softdevice & My DFU Project Downloaded on Chip

Softdevice & My DFU Project Downloaded on Chip

Help me...Thank you very much.

  • Hi,

    I also think there is something wrong with your zip file. You cannot rename it and expect it to work.

    Can you try to update just the application and see if this works?

    Use an application from an example in the SDK, but build this application yourself.

    For example:

    1. Use examples/ble_app_hrs/pca10050/s132/arm5_no_packs/ble_app_hrs_pca10050_s132.uvprojx (for KEIL)

    2. Open the project and build it.

    3. Use the hex file in examples/ble_app_hrs/pca10050/s132/arm5_no_packs/_build/nrf52832_xxaa.hex. Copy this hex file to the same folder you have your generated keys in.

    4. You need to run the nrfutil command from the same directory you have your application hex file and your private key.

    5. Generate the zip file:

    nrfutil pkg generate --hw-version 52 --application-version 1 --application nrf52832_xxaa.hex --sd-req 0x8c --key-file key.pem app_dfu_package.zip

    Does this works? I want you to test if you can perform an DFU updating only the application. You don't need to mergehex files when only doing application update.

    And what are you running in the DFU targ device? Try only running bootloader + softdevice. If you are running bootloader + softdevice + application, and one to update the application, then you need to change --application-version to 2

    - Marjeris

  • Hi Kind Answer too thank you so much.
    All of the steps 1 to 5 proceeded sequentially.
    I have done the same before and now.

    I've tried again with the command you provided, but it still does not work.

    Let's solve the order in nRF Toolbox App. Please point out anything that's wrong with this process.

    1.SELECT FILE

    2.Distribution packet(ZIP)

    3.app_dfu_package.zip

    4.application only > OK

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

    5.SELECT DEVICE

    6.'DfuTarg' buletooth Secect

    7.UPLOAD

    If you proceed with DFU in this process, the following Fail message will be displayed.

    If you proceed with DFU in the above process, you will see the result as shown below.

    If there is nothing wrong with this process, it is obvious that the process of creating app_dfu_package.zip is wrong.
    what do you think?

    Setting version information to --application-version 2 or 3 is the same.

    And
    examples / ble_app_hrs / pca10050 / s132 / arm5_no_packs / _build
    No matter how I look for nrf52832_xxaa.hex, the file does not exist.
    There is only nrf52832_xxaa_s132.hex instead.

    And what firmware should be up before DFU on the device?

  • Hi,

    Which version of the nRF toolbox app are you using?

    You can try to see if the process works using nRF Connect app.

    But I don't think app is the issue.

     

    Aser said:
    No matter how I look for nrf52832_xxaa.hex, the file does not exist.
    There is only nrf52832_xxaa_s132.hex instead.

    Did you build the example using Keil? What is the location (path) of nRF52832_xxaa_s132.hex?

    Before the DFU: the device (dfu targ) should be flashed with bootloader + softdevice:

    1. The bootloader located in \examples\dfu\bootloader_secure\

    2. Own generated private and public key should be located in examples\dfu\bootloader_secure\

    3. Replace 'dfu_public_key.c' with your own public key.

    4.Open the project  \examples\dfu\bootloader_secure\pca10040\arm5_no_packs\secure_dfu_secure_dfu_ble_s132_pca10040.uvprojx in Keil

    5.Build the bootloader with Keil

    6. Flash bootloader and softdevice.

         6.1 Erase the device

    nrfjprog --eraseall

         6.2 Program softdevice, located in components\softdevice\s132\hex\

    nrfjprog -f NRF52 --program s132_nrf52_3.0.0_softdevice.hex

        6.3 Program the bootloader, located in \examples\dfu\bootloader_secure\pca10040\arm5_no_packs\_build\nrf52832_xxaa_s132.hex

    nrfjprog -f NRF52 --program nrf52832_xxaa_s132.hex --verify --reset

    7. Verify that the bootloader starts advertising as "DFUTarg" in nRFConnect app/ nRFtoolbox app .

    I recommend you read Step A, B, C and D again in this tutorial.

    Best regards,

    Marjeris

  • My app is nRF toolbox and nRF connect.

     This log is the log that attempted the DFU function a few minutes ago.

    We use nRF connect more often. The reason is because you can check the log if you slide next to it.

    The path of my application.hex
    D: \ Project \ Wikiki_Source \ Wikiki_gitlinkage \ examples \ ble_peripheral \ ble_app_beacon_wikiki \ pca10040 \ s132 \ arm5_no_packs \ _build
    is.
    Wikiki is my project name.

    1.APP source blid -> The generated nrf52832_xxaa.hex file copy. -> nrf52832_xxaa.hex + priv.pem = app_dfu_wikiki.zip file generated.

    2.From left, 'Erase all', 'softdevice download', 'bootloader download'.

     

    3.

    It's the order of the way I've done so far.
    Is anything wrong?

    It's the order of the way I've done so far.
    Is anything wrong?
    Maybe it looks the same way you commented with the command.

    I'll try it from now on the way you've told me.

Related