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

Couldn't advertising unprovisioned packet after Mesh DFU

Hi Nordic teams,

I'm trying to integrate the DFU function into light_switch example this days. At the beginning, I used the dfu example to update my evaluation board, and it works fine (My evaluation board is starting blinky).

I encountered some issues when I'd integrated the dfu function. For more reliability, I use two files which are identical framework except the RTT logs and advertising name. At the first updating, device send the correct RTT log and advertising name. At the second updating, device only send the correct RTT log but not to start advertising. I can make sure that the parameter of application version is higher than current one. According to the logs in second update, I can confirm that device is already update. Why dose device is unable to advertise?

My environment as below

SDK: Mesh SDK 3.2

Softdevice: S132.6.1.1

Quantity of source role: 1

Quantity of target role: 2

The scripts on source role:

cd %~dp0

:: Generate a DFU file with nrfutil
nrfutil dfu genpkg --application bin/light_switch/APK.hex --application-version 3 --company-id 0x68030000 --application-id 1 --key-file private_key.txt --sd-req 0x00B7 --mesh dfu_test.zip

cd tools\dfu\

:: Generate a HEX version of device page
python device_page_generator.py -d nrf52832_xxAA -sd "s132_6.1.1"

cd ..\..\

:: Erase chip memory and flash SoftDevice on all devices
nrfjprog -s 682182419 --program bin/softdevice/s132_nrf52_6.1.1_softdevice.hex --chiperase

:: Flash the serial bootloader on all devices
nrfjprog -s 682182419 --program bin/bootloader/gccarmemb/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex

:: Flash the first application on all devices
nrfjprog -s 682182419 --program examples/dfu/build/dfu_nrf52832_xxAA_s132_6.1.1_Debug/dfu_nrf52832_xxAA_s132_6.1.1.hex

:: Flash the device page on all devices and reset the device
nrfjprog -s 682182419 --program tools/dfu/bin/device_page_nrf52832_xxAA_s132_6.1.1.hex
nrfjprog -s 682182419 --reset

:: Transferring the DFU archive over serial with nrfutil
nrfutil dfu serial -pkg dfu_test.zip -p COM67 -b 115200 -fc --mesh

pause

The scripts on target role:

cd %~dp0

:: Generate a DFU file with nrfutil
nrfutil dfu genpkg --application bin/light_switch/APK.hex --application-version 2 --company-id 0x68030000 --application-id 1 --key-file private_key.txt --sd-req 0x00B7 --mesh dfu_test.zip

cd tools\dfu\

:: Generate a HEX version of device page
python device_page_generator.py -d nrf52832_xxAA -sd "s132_6.1.1"

cd ..\..\

:: Erase chip memory and flash SoftDevice on all devices
nrfjprog -s 682236063 --program bin/softdevice/s132_nrf52_6.1.1_softdevice.hex --chiperase

:: Flash the serial bootloader on all devices
nrfjprog -s 682236063 --program bin/bootloader/gccarmemb/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex

:: Flash the first application on all devices
nrfjprog -s 682236063 --program bin/light_switch/My_test.hex

:: Flash the device page on all devices and reset the device
nrfjprog -s 682236063 --program tools/dfu/bin/device_page_nrf52832_xxAA_s132_6.1.1.hex
nrfjprog -s 682236063 --reset

pause

This issue occurred twice. Dose the DFU overwrite the flash contains application data or unprovisioned state?

Related