Hello ...
I'm adding buttonless DFU support to my nRF52810 application using the instructions here. I'm using SDK 15.3.0, SD 112 6.1.1.
First question: These instructions state that use of Peer Manager is a prerequisite. If my application does not use bonding, is Peer Manager still a prerequisite?
I was successful in adding buttonless DFU support to the ble_app_blinky example application. Generally, I followed these steps:
1. Generated private/public key pair.
2. Replaced dfu_public_key.c for the example secure bootloader project at: <nRF5 SDK Folder>/examples/dfu/
3. Built application <nRF5 SDK Folder>/examples/dfu/secure_bootloader/pca10040e_ble/ses/secure_bootloader_ble_s112_pca10040e.emProject
4. Updated the ble_app_blinky example app according to Nordic instructions (added dfu .c files to project, added preprocessor definitions, added include directories, made changes to sdk_config.h, added includes and source additions to main.c).
5. Built ble_app_blinky with added buttonless DFU support.
6. Generated the bootloader settings file using nrfutil for the application ble_app_blinky_pca10040e_s112.hex
7. Using mergehex, merged the bootloader settings, bootloader and softdevice together.
8. Merged the output of 7 with the application.
9. Used nrfjprog to erase, program and reset the nRF52 dev kit.
10. Using nRF Connect (mobile for iOS v2.1.1) I verified that the secure DFU service is available.
11. Then I created a version 2 of the ble_app_blinky application (I just changed which LED is turned on when connected via BLE).
12. Created a DFU package for the new application (--application-version 2 --hw-version 52 --sd-req 0xB8).
13. I transferred the package from 12 to my iOS device, then used nRF Connect (mobile) to connect to the nRF52 dev kit and perform a DFU using the package from 12. All worked well.
Then ... I proceeded to follow the same steps to add buttonless DFU support to my own BLE application. My BLE application is the ble_app_uart example app with uart stripped out and TWIM added. The hex file for the built application is 158K.
After programming the dev kit with the bootloader settings + bootloader + v1 of application, I created version 2 of the application, created the DFU package, transferred to my iOS device and tried to DFU to the dev kit. I get timeout error for Data object 2/14. I've attached the nRF Connect mobile log. I tried the same using nRF Connect desktop (macOS, Bluetooth Low Energy v2.3.2). I've attached log for that as well.
This is new learning for me. Appreciate any guidance.
Thanks,
Tim