Hello everyone,
I've followed the following guide for mesh dfu and had no issues with the example provided here : https://www.nordicsemi.com/DocLib/Content/SDK_Doc/Mesh_SDK/v3-0-0/md_doc_getting_started_dfu_quick_start
Now I would like to do the same but with a different binary, I would like to DFU the light switch client example instead of blinky. When I try to execute the DFU process I have an error : Failed to upgrade target. Error is: Crashed on start packet.
Here's the process I go through to do this using 2 nrf52840-dk boards:
I followed step 1 and 2.
I generated the new dfu_test.zip :
C:\Python27\Scripts>nrfutil dfu genpkg --application "C:\development\nRF5_SDK_Mesh_3.10\examples\light_switch\client\build\light_switch_client_nrf52840_xxAA_s140_6.1.0_Release\light_switch_client_nrf52840_xxAA_s140_6.1.0.hex" --company-id 0x00000059 --application-id 1 --application-version 2 --key-file private_key.txt --sd-req 0x00AF --mesh dfu_test2.zip Key file was given, setting DFU version to 0.8 Zip created at dfu_test2.zip
Then do the following steps(I am using the device page previously generated for the example with blinky):
C:\Python27\Scripts>nrfjprog --eraseall Erasing user available code and UICR flash areas. Applying system reset. C:\Python27\Scripts>nrfjprog --eraseall Erasing user available code and UICR flash areas. Applying system reset. C:\Python27\Scripts> C:\Python27\Scripts>nrfjprog --program c:\development\nRF5_SDK_Mesh_3.10\bin\softdevice\s140_nrf52_6.1.0_softdevice.hex --chiperase Parsing hex file. Erasing user available code and UICR flash areas. Applying system reset. Checking that the area to write is not protected. Programming device. C:\Python27\Scripts>nrfjprog --program c:\development\nRF5_SDK_Mesh_3.10\bin\softdevice\s140_nrf52_6.1.0_softdevice.hex --chiperase Parsing hex file. Erasing user available code and UICR flash areas. Applying system reset. Checking that the area to write is not protected. Programming device. C:\Python27\Scripts>nrfjprog --program c:\development\nRF5_SDK_Mesh_3.10\bin\bootloader\gccarmemb\mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.hex Parsing hex file. Reading flash area to program to guarantee it is erased. Checking that the area to write is not protected. Programming device. C:\Python27\Scripts>nrfjprog --program c:\development\nRF5_SDK_Mesh_3.10\bin\bootloader\gccarmemb\mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.hex Parsing hex file. Reading flash area to program to guarantee it is erased. Checking that the area to write is not protected. Programming device. C:\Python27\Scripts>nrfjprog --program c:\development\nRF5_SDK_Mesh_3.10\examples\dfu\build\dfu_nrf52840_xxAA_s140_6.1.0_Release\dfu_nrf52840_xxAA_s140_6.1.0.hex Parsing hex file. Reading flash area to program to guarantee it is erased. Checking that the area to write is not protected. Programming device. C:\Python27\Scripts> C:\Python27\Scripts>nrfjprog --program c:\development\nRF5_SDK_Mesh_3.10\examples\dfu\build\dfu_nrf52840_xxAA_s140_6.1.0_Release\dfu_nrf52840_xxAA_s140_6.1.0.hex Parsing hex file. Reading flash area to program to guarantee it is erased. Checking that the area to write is not protected. Programming device. C:\Python27\Scripts>nrfjprog --program c:\development\nRF5_SDK_Mesh_3.10\tools\dfu\bin\device_page_nrf52840_xxAA_s140_6.1.0.hex Parsing hex file. Reading flash area to program to guarantee it is erased. Checking that the area to write is not protected. Programming device. C:\Python27\Scripts>nrfjprog --program c:\development\nRF5_SDK_Mesh_3.10\tools\dfu\bin\device_page_nrf52840_xxAA_s140_6.1.0.hex Parsing hex file. Reading flash area to program to guarantee it is erased. Checking that the area to write is not protected. Programming device. C:\Python27\Scripts>nrfjprog --reset Applying system reset. Run. C:\Python27\Scripts>nrfjprog --reset Applying system reset. Run. C:\Python27\Scripts>nrfutil --verbose dfu serial -pkg dfu_test2.zip -p COM213 -b 115200 -fc --mesh Upgrading target on COM213 with DFU package C:\Python27\Scripts\dfu_test2.zip. Flow control is enabled. Flushing com-port... Opened com-port Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 97536 Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing. PC -> target: 0502aabbccdd target -> PC: 0582aabbccdd Got echo response Sending DFU init packet PC -> target: 1378fdff040f8bc8406d59000000010002000000 target -> PC: 0384788e PC -> target: 1378fdff040f8bc8406d59000000010002000000 target -> PC: 0384788e PC -> target: 1378fdff040f8bc8406d59000000010002000000 target -> PC: 0384788e PC -> target: 1378fdff040f8bc8406d59000000010002000000 target -> PC: 0384788e PC -> target: 1378fdff040f8bc8406d59000000010002000000 target -> PC: 0384788e Failed to upgrade target. Error is: Device returned an unknown status code (142) on a DFU state beacon packet. Possible causes: - bootloader, SoftDevice or application on target does not match the requirements in the DFU package. - baud rate or flow control is not the same as in the target bootloader. - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode. Closing serial port...
Anything I am doing wrong?
Thank you in advance
Edit:
Today when I tried the same steps I have the following error when trying to DFU the dfu_test.zip package:
C:\Python27\Scripts>nrfutil --verbose dfu serial -pkg dfu_test2.zip -p COM213 -b 115200 -fc --mesh Upgrading target on COM213 with DFU package C:\Python27\Scripts\dfu_test2.zip. Flow control is enabled. Flushing com-port... Opened com-port Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 97536 Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing. PC -> target: 0502aabbccdd target -> PC: 0582aabbccdd Got echo response Sending DFU init packet PC -> target: 1378fdff040f6a6c582559000000010002000000 target -> PC: 16a6045900000001000200000059000000010001000000 target -> PC: 03847800 PC -> target: 1378fdff040f6a6c582559000000010002000000 target -> PC: 03847800 PC -> target: 1478fcff00006a6c5825ffffffff405f000040000c PC -> target: 1478fcff00006a6c5825ffffffff405f000040000c PC -> target: 1478fcff00006a6c5825ffffffff405f000040000c PC -> target: 1478fcff00006a6c5825ffffffff405f000040000c PC -> target: 1478fcff00006a6c5825ffffffff405f000040000c target -> PC: 0da2010459000000010002000000 target -> PC: 03847800 target -> PC: 03847800 target -> PC: 03847800 target -> PC: 03847800 target -> PC: 03847800 Failed to upgrade target. Error is: Crashed on start packet Possible causes: - bootloader, SoftDevice or application on target does not match the requirements in the DFU package. - baud rate or flow control is not the same as in the target bootloader. - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode. Closing serial port...