Hi all,
We are successfully using the nRF52840 chip in one of our projects except for the DFU functionality. We tried following these tutorials without success:
devzone.nordicsemi.com/.../getting-started-with-nordics-secure-dfu-bootloader
github.com/.../nRF52832-buttonless-dfu-development-tutorial
Our firmware includes the bootloader (with minimal modifications) that Nordic provides, the S140 v6.1.1 SoftDevice, and our application functionality on top of that. The problem appears when trying to update the app with a new version (we don't need to update SD or BL). Testing with nRF Connect, we receive a "Invalid object error" shortly after selecting the zip and starting the DFU procedure. We found that NRF_DFU_REQUIRE_SIGNED_APP_UPDATE set to 0 makes the updates work, so the deduction is that the problem comes from the password checking of the zip.
This post has a project attached where the problem is replicated. It is a copy of the DFU example of nRF5 SDK v15.3.0 for PCA10056 and Segger Studio, and it contains a generated private and public keys for the purpose of this post in addition to the HTS example hex, which is used to test the bootloader and update the app. The folder should be copied to \nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\ and the public key to \nRF5_SDK_15.3.0_59ac345\examples\dfu\dfu_public_key.c.
As can be tested in the project, setting NRF_DFU_REQUIRE_SIGNED_APP_UPDATE to 0 in sdk_config.h generates a bootloader that will accept the zip updates. These zips can be generated in the subfolder dfu_gen with the script "generate_files.bat". One aspect that differs from the tutorials is that we did not need to add any uECC library, as the project compiled fine without it. Also, all the testing we have done has been with no bonding.
Thanks in advance,
Best regards.