Hello everyone,
I set up Thread Secure OTA DFU Example by using a nrf52840 DK as DFU server and a nrf52840 Dongle as DFU client. I am using nRF5 SDK for Thread and Zigbee v4.0.0.
I modified the client project and the bootloader in the example (which are for the DK) in order to be flashed on the Dongle. In particular, I simply changed the preprocessor definition from BOARD_PCA10056 to BOARD_PCA10059. I did no changes to the macros defining flash and ram start addresses and sizes, since they should already take into account the presence of mbr and bootloader.
Then, according to this tutorial https://infocenter.nordicsemi.com/topic/sdk_tz_v4.0.0/thread_example_dfu.html , I performed the following steps:
On the DONGLE:
> Erase: nrfjprog -f nrf52 --eraseall
> Flash mbr: nrfjprog -f nrf52 -r --program ../../../components/softdevice/mbr/hex/mbr_nrf52_2.4.1_mbr.hex --chiperase
> Flash bootloader: nrfjprog -f nrf52 -r --program bootloader/pca10059/blank/armgcc/_build/nrf52840_xxaa_mbr.hex
> compile client application: make -C client/pca10059/blank/armgcc
> generate settins file: nrfutil settings generate --family NRF52840 --application client/pca10059/blank/armgcc/_build/nrf52840_xxaa.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex
> merge settings with client application: mergehex -m client/pca10059/blank/armgcc/_build/nrf52840_xxaa.hex settings.hex -o dfu_client.hex
> flash client application: nrfjprog -f nrf52 -r --program dfu_client.hex --sectorerase
If I read the dongle memory, the result is the folloqing one:
Subsequently, I modified the client project by adding this line:
bsp_board_led_on(3);
then compiled client application again and generated the new fw zip package with:
> nrfutil pkg generate --hw-version 52 --sd-req 0x00 --application-version 2 --application client/pca10059/blank/armgcc/_build/nrf52840_xxaa.hex --key-file priv.pem app_dfu_package.zip
Finally, I run this command on the DK:
> nrfutil dfu thread -f -pkg app_dfu_package.zip -p COM13 --channel 11 --panid 43981.
The result is that the dfu server remains in this condition and no firmware update occurs on the dongle. I do not see the reset of the client and the led being lighted by the new application.
I also set up a thread sniffer in order to understand what is happening; this is what I get:
If I power the dongle off and then power it on again, the behaviour is the following:
I have just started working with thread, but I think that the problem is that dfu server is not responding to the Trigger Packet (GET) sent by the dongle.
Is it correct? What could be the reason for this wrong behaviour?
Thank you.
Michela