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

ble_app_dfu_template app update over BLE is failing

I am using nordic_sdk_10 with nrf51822 USB Dongle. I did a eraseall

flashed my softdevice and dfu bootloader and did a reset. Now i can see advertisement report DFU_Targ from master control pannel.

Here i am facing two issues:

1> flashed ble_app_dfu_template app from examples/ble_peripheral/ble_app_dfu_template/pca10001/s130_with_dfu/armgcc.

As per code from my nrf mater controll i should get advertisement as Nordic_Template but still DFU_targ was vissible.

2> Tried to connect to DFU_Targ and updated the ble_app_dfu_template app from my nrf master control panel. DFU was successfull and able to see advertisements with Nordic_Template. I modified the app code DEVICE_NAME to Nordic_Template01 as bumbed the DFU_REV_MINOR, created the package with nrfutil and tried to do a OTA. This time nrf control panel got disconnected and reconnected and Update was not started.

  • FormerMember
    0 FormerMember

    1) When a bootloader is programmed to the chip, the chip will first start to run the bootloader and check if there is a valid application there as well. If there is a valid application present, it will start the application. To check if there is a valid application present, the bootloader check the m_boot_settings flag. m_boot_settings is set after a successful DFU update. That's why your ble_app_template app is advertising after the DFU update.

    If you program the bootloader and the application to the chip at the same time, you will therefore have to set the flag manually, in order to make the application start. Initialization of m_boot_settings should therefore be set to the following:

    uint8_t  m_boot_settings[CODE_PAGE_SIZE] __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used)) = {BANK_VALID_APP};
    

    2) Regarding the failed update.

    • Could you try one of the .zip files in our SDK and check if they work?

    • What does the log in the nRF Master Control Panel show? Do you use Android or iOS?

    • Do you have an extra nRF51-DK or a nRF51-Dongle? If so, could you use the sniffer to track what is being transferred over the air? And upload the sniffer trace here?

    The sniffer should be used with Wireshark, and it works best with version 1.10, not one of the newer versions. Wireshark can be downloaded here:

Related