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

Buttonless DFU

Hi,

1) I would like to program softdevice + buttonless DFU + app in production using J-Link.I tried that but my device always runs bootloader only, in never jumps to app. How to make bootloader to run app after initial production programming?

2) I see we generate update packages using pkg generate --hw-version 52 --sd-req 0xA8,0xAF,0xB7 --application-version 2 .........   What is initial application version after my initial production programming?

3) I want only peer who reset  my device from app to bootloader to be able to connect to bootloader and perform firmware update. How to do that?

Parents
  • 1) You need to generate the settings to tell the bootloader that there is an app available to run. To do this run something like the following

    nrfutil settings generate --family NRF52 --application $(OUTPUT_DIRECTORY)/nrf52832_xxaa.hex
    --application-version 2 --bootloader-version 1 --bl-settings-version 1 $(OUTPUT_DIRECTORY)/boot_settings.hex
    

    Then you will need to merge the boot_settings.hex with the softdevice, the bootloader and the application hex. Using mergehex.

    2) It is what you put in the --aplication-version flag when generating the settings.

    You can read more about it her https://github.com/NordicSemiconductor/pc-nrfutil and here infocenter.nordicsemi.com/.../nrf5x_mergehex.html

    3) You need to set the NRF_DFU_BLE_REQUIRES_BONDS flag to 1 in sdk_config.h in the bootloader project. This will require the device to be bonded with the peer to perform the firmware update.

Reply
  • 1) You need to generate the settings to tell the bootloader that there is an app available to run. To do this run something like the following

    nrfutil settings generate --family NRF52 --application $(OUTPUT_DIRECTORY)/nrf52832_xxaa.hex
    --application-version 2 --bootloader-version 1 --bl-settings-version 1 $(OUTPUT_DIRECTORY)/boot_settings.hex
    

    Then you will need to merge the boot_settings.hex with the softdevice, the bootloader and the application hex. Using mergehex.

    2) It is what you put in the --aplication-version flag when generating the settings.

    You can read more about it her https://github.com/NordicSemiconductor/pc-nrfutil and here infocenter.nordicsemi.com/.../nrf5x_mergehex.html

    3) You need to set the NRF_DFU_BLE_REQUIRES_BONDS flag to 1 in sdk_config.h in the bootloader project. This will require the device to be bonded with the peer to perform the firmware update.

Children
Related