Dear
I am try to perform an OTA operation on a dongle of nrf52840 by ble_app_blinky for PCA10059 project and light-switch server for PCA10059 project, which works well on the PCA10059.
For the OTA operation, I have a Android smart phone with nRF toolbox , a PCA10056 DK which can be connect to a dongle by swd interface. I use nRF5 SDK_16.0.0 and SDK for MASH 4.0.0.
In these case, the Softdevice will be " s140_nrf52_7.0.1_softdevice"
Step1 : I make a pair keys for this operation by nrfutil command and build "secure_bootloader_ble_s140_pca10056_debug.emProject" project with the new public_key.
Step2 : I download the dfu_bootloader which be built last step to dongle which be clean by "nrfjprog -e"
Step3 : Make a dfu.zip for ble_app_blinky project by nrfutil command which is
nrfutil pkg generate --hw-version 52 --debug-mode --sd-req 0x00 --sd-id 0xCA --application ble_app_blinky_pca10059_s140.hex --key-file private.key --softdevice s140_nrf52_7.0.1_softdevice.hex ble_app_blinky_pca10059_s140_sd_DBdfu_package.zip
Make a dfu.zip for light-switch server for PCA10059 project by nrfutil command which is
nrfutil pkg generate --hw-version 52 --debug-mode --sd-req 0x00 --sd-id 0xCA --application light_switch_server_nrf52840_xxAA_s140_7.0.1.hex --key-file private.key --softdevice s140_nrf52_7.0.1_softdevice.hex light_switch_server_nrf52840_xxAA_s140_V701_sd_DBdfu_package.zip
Step4 : Upload those packages to different Dongle separately by DFU of nRF Toolbox on Android smart phone. All of them be successful.
Step5 : Modify the ble_app_blinky for PCA10059 project and light-switch server for PCA10059 project by exchange LED pins with each other. Repeat step3 to step4. All of them be failure with a error "DFU characteristic not found"
Q1: Is there anything wrong with the process described above?Why does the first update succeed, but then fail (only once?)?
Q2: When I doing DFU on DFU tools of nrf toolbox on my phone, if I select "Application" as file type, I have to select an other file as init package. which mean is if I want download an app.hex to chips, an init package will be supported. Because the SES can build a project to generate a hex file and can download the hex file to chip. For this reason, can I assume that SES also generated the corresponding init package during the build? If the answer is yes, where is the init package?
Q3: About the bootloader setting page, If a donwload a app.hex go through bootloader, a bootloader setting page will be generated by bootloader. is it correct?
When I read the post here, I donot uderstand those words below.
"But in production for example, you may not want to install the application by doing OTA DFU for thousands of device which takes lots of time. The same when you are doing development. You don't want to do DFU for any change you made to your application.
To solve this, we can generate a bootloader setting manually and merge it with the bootloader to trick the bootloader to accept the pre-flashed application. We use nrfutil to generate the bootloader setting and can use mergehex.exe tool to merge the hex files. If you don't want to merge you can flash the setting first then flash the bootloader."
Would you explain the function to me. Some examples will be better for me.
Q5: I want doing a OTA by a dongle and a PCA10056. which tools can be used on my disktop like the DFU of nrf toolbox on smart phone? How I can connect the PCA10056 with the desktop(J2 or J3 or others connector)? Do i need download the dfu project to the PCA10056? Do you have a manual with detail?
Thanks,
Di-Sheng