Hi,
I'm able to run the DFU mesh from the quick guide and now I want to integrate the DFU into my application.
My application is based on the light switch example, so I only added nrf_mesh_serial_xxx functions
When running the script I get the following errors
nrfutil --verbose dfu serial -pkg dfu_test.zip -p COM26 -b 115200 -fc --mesh Upgrading target on COM26 with DFU package C:\Nordic\nrf5_SDK_for_Mesh_v2.0.1_src\dfu_test.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: 1656 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: 1378fdff040fac5e402759000000010002000000 target -> PC: 16a6045900000001000200000059000000010001000000 target -> PC: 03847800 PC -> target: 1378fdff040fac5e402759000000010002000000 target -> PC: 16a6045900000001000200000059000000010001000000 target -> PC: 03847800 PC -> target: 1478fcff0000ac5e4027ffffffff9e01000000000c target -> PC: 03847887 PC -> target: 1478fcff0000ac5e4027ffffffff9e01000000000c target -> PC: 03847887 PC -> target: 1478fcff0000ac5e4027ffffffff9e01000000000c target -> PC: 03847887 PC -> target: 1478fcff0000ac5e4027ffffffff9e01000000000c target -> PC: 03847887 PC -> target: 1478fcff0000ac5e4027ffffffff9e01000000000c target -> PC: 03847887
Failed to upgrade target. Error is: Device returned status code ERROR_INVALID_DATA (135) on a DFU data packet.
This error is returned by nrf_mesh_dfu_rx() in serial_handler_openmesh_rx().
The script i'm using is below, which is the same I use with dfu example:
cd C:\Nordic\nrf5_SDK_for_Mesh_v2.0.1_src echo 3. Generate a DFU file with nrfutil nrfutil dfu genpkg --application bin/blinky/blinky_nrf52840_xxAA_s140_6.0.0.hex --company-id 0x00000059 --application-id 1 --application-version 2 --sd-req 0x00A9 --mesh dfu_test.zip echo 4. Generate a HEX version of your device page cd C:\Nordic\nrf5_SDK_for_Mesh_v2.0.1_src\tools\dfu python device_page_generator.py -d nrf52840_xxAA -sd "s140_6.0.0" cd C:\Nordic\nrf5_SDK_for_Mesh_v2.0.1_src echo 5. Erase all chip memory (including UICR) on all devices nrfjprog -s 683954026 --eraseall echo 6. Flash the SoftDevice on all devices nrfjprog -s 683954026 --program bin\softdevice\s140_nrf52_6.0.0_softdevice.hex --chiperase echo 7. Flash the serial bootloader on all devices nrfjprog -s 683954026 --program bin\bootloader\gccarmemb\mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.hex echo 8. Flash the first application on all devices nrfjprog -s 683954026 --program App\anchor.hex echo 9. Flash the device page on all devices nrfjprog -s 683954026 --program tools/dfu/bin/device_page_nrf52832_xxAA_s132_5.0.0.hex nrfjprog -s 683954026 --reset pause echo Step 10. Transfer the DFU archive over serial with nrfutil nrfutil --verbose dfu serial -pkg dfu_test.zip -p COM26 -b 115200 -fc --mesh
I'm not able to read the data sent from PC -> target:
for example 1478fcff0000ac5e4027ffffffff9e01000000000c
I only understand 0x78 which is SERIAL_OPCODE_CMD_OPENMESH_DFU_DATA
and 0xFFF9 = DFU_PACKET_TYPE_RELAY_REQ