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

DFU with bonds issue

Hello!

I'm trying to add bonding to my DFU. The DFU without bonds works perfectly but when I set  #define NRF_DFU_BLE_REQUIRES_BONDS  and NRF_SDH_BLE_SERVICE_CHANGED to 1 the code crashes.

Any idea how to fix this?

Thanks for the help!

SDK5 15.2, SES, nRF52832

Parents
  • Hi Gerardo, 

    I sincerly appologize for the late reply. I did a quick test with the secure bootloader and buttonless DFU example from SDK v15.2.0 and I did not see any issues when doing this in this order:

    1. Set NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS to 1 in the sdk_config.h file of the ble_app_buttonless_dfu project.
    2. Set NRF_DFU_BLE_REQUIRES_BONDS to 1 and NRF_SDH_BLE_SERVICE_CHANGED to 1 in the sdk_config.h file of the secure_bootloader project.
    3. Replace the 
    4. Compile both projects
    5. Download nrfutil v4.0.0 or newer from https://github.com/NordicSemiconductor/pc-nrfutil/releases
    6. Generate the settings page using the following nrfutil command
      nrfutil.exe settings generate --family NRF52 --application ble_app_buttonless_dfu_pca10040_s132.hex --application-version 1 --bl-settings-version 1 --bootloader-version 1 settings.hex
      

    7. Use mergehex to merge the SD, BL and APP using the following command:
      mergehex -m ble_app_buttonless_dfu_pca10040_s132.hex s132_nrf52_6.1.0_softdevice.hex secure_bootloader_ble_s132_pca10040_debug.hex -o sd_ble_app.hex
    8. Use mergehex to merge the sd_ble_app.hex with the settings.hex:
      mergehex -m sd_ble_app.hex settings.hex -o sd_ble_app_settings.hex
    9. Flash the combined SD, BL and APP + Settings hex file to the nRF5X device:
      nrfjprog --program sd_ble_app_settings.hex --chiperase --reset
    10. nRF5x device should start advertising as "Nordic_Buttonless"

    Best regards
    Bjørn

Reply
  • Hi Gerardo, 

    I sincerly appologize for the late reply. I did a quick test with the secure bootloader and buttonless DFU example from SDK v15.2.0 and I did not see any issues when doing this in this order:

    1. Set NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS to 1 in the sdk_config.h file of the ble_app_buttonless_dfu project.
    2. Set NRF_DFU_BLE_REQUIRES_BONDS to 1 and NRF_SDH_BLE_SERVICE_CHANGED to 1 in the sdk_config.h file of the secure_bootloader project.
    3. Replace the 
    4. Compile both projects
    5. Download nrfutil v4.0.0 or newer from https://github.com/NordicSemiconductor/pc-nrfutil/releases
    6. Generate the settings page using the following nrfutil command
      nrfutil.exe settings generate --family NRF52 --application ble_app_buttonless_dfu_pca10040_s132.hex --application-version 1 --bl-settings-version 1 --bootloader-version 1 settings.hex
      

    7. Use mergehex to merge the SD, BL and APP using the following command:
      mergehex -m ble_app_buttonless_dfu_pca10040_s132.hex s132_nrf52_6.1.0_softdevice.hex secure_bootloader_ble_s132_pca10040_debug.hex -o sd_ble_app.hex
    8. Use mergehex to merge the sd_ble_app.hex with the settings.hex:
      mergehex -m sd_ble_app.hex settings.hex -o sd_ble_app_settings.hex
    9. Flash the combined SD, BL and APP + Settings hex file to the nRF5X device:
      nrfjprog --program sd_ble_app_settings.hex --chiperase --reset
    10. nRF5x device should start advertising as "Nordic_Buttonless"

    Best regards
    Bjørn

Children
No Data
Related