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

MESH DFU nrfutil configuration

Based on the mesh sdk3.1 operation dfu, according to the operation instructions, dfu_mesh.zip cannot be generated.

nrfutil dfu genpkg --hlep  Found no parameters for mesh dfu

How to configure nrfutil to be used for mesh dfu? Reference https://github.com/NordicSemiconductor/pc-nrfutil/tree/mesh_dfu  still fails。

Parents
  • Did you checkout the right branch from that github repo? After cloning the repo remember to do 'git checkout mesh_dfu'. What does it say when you write 'nrfutil version'. Also remember to run the nrfutil that is located in the git folder not any other previously installed on your system.

  • Hi Stian

    The previous problem has been solved, and now there are new problems, please help solve.
    Use nRF52832QFAA based on softdevice:SDK15.2.0 and mesh:mesh3.1.0
    Enter the following command with nrfutil:

    nrfutil dfu genpkg --application bin/blinky/blinky_nrf52832_xxAA_s132_6.1.0.hex --company-id 0x00000059 --application-id 1 --application-version 5 --key-file private_key.txt --sd-req 0x00AF --mesh dfu_test_blinky-52832.zip
    
    
    python device_page_generator.py -d nrf52832_xxAA -sd "s132_6.1.0"
    
    
    nrfjprog --eraseall 
    
    
    nrfjprog --program bin/softdevice/s132_nrf52_6.1.0_softdevice.hex --chiperase
    
    
    
    nrfjprog --program bin/bootloader/gccarmemb/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex  --verify
    
    
    
    nrfjprog --program examples/dfu/build/dfu_nrf52832_xxAA_s132_6.1.0_Debug/dfu_nrf52832_xxAA_s132_6.1.0.hex --verify
    
    
    nrfjprog --program tools/dfu/bin/device_page_nrf52832_xxAA_s132_6.1.0.hex
    
    
    nrfjprog --reset
    
    nrfutil --verbose dfu serial -pkg dfu_test_blinky-52832.zip -p COM19 -b 115200 -fc --mesh
    
    

    Dfu failed, as follows:

    Upgrading target on COM19 with DFU package E:\Nordic\nrf5_SDK_for_Mesh_v3.1.0_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: 2468
    
    Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.
    
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    
    
    Failed to upgrade target. Error is: Failed to establish connection
    Failed to upgrade target. Error is: Failed to establish connection
    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...
    
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    ERROR: The area to write is not erased.
    View logs via rtt:
    00> <t: 26729>, main.c, 253, DFU example started!<t: 1>, main.c, 206, ----- Bluetooth Mesh DFU Example -----<t: 8770>, serial_handler_prov.c, 267, Generating encryption keypair...<t: 13577>, main.c, 224, Initialization complete!
    00> <t: 18272>, main.c, 245, Enabling serial interface...
    00> <t: 18275>, mesh_app_utils.c, 65, Device UUID (raw): 91A458BF77D0ED47A630876BA02C04F4
    00> <t: 18278>, mesh_app_utils.c, 70, DeviceUUID : BF58A491-D077-47ED-A630-876BA02C04F4
    00> <t: 18286>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
    00> <t: 18291>, nrf_mesh_dfu.c, 561, SERIAL TX!
    00> <t: 18297>, main.c, 253, DFU example started!
    Dfu is running normally. Why is failed to establish connection? How to solve it?

Reply
  • Hi Stian

    The previous problem has been solved, and now there are new problems, please help solve.
    Use nRF52832QFAA based on softdevice:SDK15.2.0 and mesh:mesh3.1.0
    Enter the following command with nrfutil:

    nrfutil dfu genpkg --application bin/blinky/blinky_nrf52832_xxAA_s132_6.1.0.hex --company-id 0x00000059 --application-id 1 --application-version 5 --key-file private_key.txt --sd-req 0x00AF --mesh dfu_test_blinky-52832.zip
    
    
    python device_page_generator.py -d nrf52832_xxAA -sd "s132_6.1.0"
    
    
    nrfjprog --eraseall 
    
    
    nrfjprog --program bin/softdevice/s132_nrf52_6.1.0_softdevice.hex --chiperase
    
    
    
    nrfjprog --program bin/bootloader/gccarmemb/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex  --verify
    
    
    
    nrfjprog --program examples/dfu/build/dfu_nrf52832_xxAA_s132_6.1.0_Debug/dfu_nrf52832_xxAA_s132_6.1.0.hex --verify
    
    
    nrfjprog --program tools/dfu/bin/device_page_nrf52832_xxAA_s132_6.1.0.hex
    
    
    nrfjprog --reset
    
    nrfutil --verbose dfu serial -pkg dfu_test_blinky-52832.zip -p COM19 -b 115200 -fc --mesh
    
    

    Dfu failed, as follows:

    Upgrading target on COM19 with DFU package E:\Nordic\nrf5_SDK_for_Mesh_v3.1.0_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: 2468
    
    Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.
    
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    
    
    Failed to upgrade target. Error is: Failed to establish connection
    Failed to upgrade target. Error is: Failed to establish connection
    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...
    
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    ERROR: The area to write is not erased.
    View logs via rtt:
    00> <t: 26729>, main.c, 253, DFU example started!<t: 1>, main.c, 206, ----- Bluetooth Mesh DFU Example -----<t: 8770>, serial_handler_prov.c, 267, Generating encryption keypair...<t: 13577>, main.c, 224, Initialization complete!
    00> <t: 18272>, main.c, 245, Enabling serial interface...
    00> <t: 18275>, mesh_app_utils.c, 65, Device UUID (raw): 91A458BF77D0ED47A630876BA02C04F4
    00> <t: 18278>, mesh_app_utils.c, 70, DeviceUUID : BF58A491-D077-47ED-A630-876BA02C04F4
    00> <t: 18286>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
    00> <t: 18291>, nrf_mesh_dfu.c, 561, SERIAL TX!
    00> <t: 18297>, main.c, 253, DFU example started!
    Dfu is running normally. Why is failed to establish connection? How to solve it?

Children
Related