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

About Mesh DFU Test

         1.      I used the nRF5 SDK for Mesh v2.2.0 version to test the Mesh DFU feature and follow the DFU example tutorial.

               http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v2.2.0%2Fmd_doc_getting_started_getting_started.html     ------->DFU quick start guide

         2.      The upgraded application is blinky_nrf52840_xxAA_s140_6.0.0.hex. After the upgrade is complete, I want to upgrade the second time, but it is not successful.

                  mesh-sdk$ nrfutil dfu genpkg --application bin/blinky/blinky_nrf52832_xxAA_s132_6.0.0.hex \

                  --company-id 0x00000059 \
                  --application-id 1 \
                  --application-version 2 \
                  --key-file private_key.txt \
                  --sd-req 0x009D \
                  --mesh dfu_test.zip

         3.      Then I went to check the source code of the DFU upgrade, so I think the application blinky_nrf52840_xxAA_s140_6.0.0.hex is not equipped with DFU function, just for flash led.

                  

         4.     Finally, I tried to clear the device program and re-run the first upgrade, but the application selected the hex program compiled by the DFU routine. The file size is about 300K, but the upgrade is very slow, and finally there is no upgrade.

               nrfutil dfu genpkg --application examples/NOA_dfu/build/dfu_nrf52840_xxAA_s140_6.0.0_Debug/dfu_nrf52840_xxAA_s140_6.0.0.hex --company-id 0x00000059 --application-id 1 --application-version 3 --key-file private_key.txt --sd-req 0x009D --mesh dfu_test.zip

         I want to know if my understanding is accurate. And whether the application must be modified based on the DFU example, under the premise that the MESH DFU function is required

Parents
  • Hi,

    It should work to do the DFU multiple times. Like the documentation states, you will need to do this:

    "To try another DFU, re-run steps 3 and 10 with an increased version number, for example --application-version 3, and use the new zip file to do the DFU again."

    If you have not already created a script, I would start there. Then, I would erase the boards completely & start from scratch one more time. 

    How many dev kits are you testing with atm?

    Regarding your 4th point, I would delete all of the zip files generated & start from scratch. Then, it should work to do the DFU multiple times.

    Kind Regards,

    Bjørn

  • Yes. I have deleted all of  the zip files and re-run step3 and 10. --application-version 4.

    The first DFU was successful, but the second DFU prompted the following error.

    /**********************************************************************************************

    Upgrading target on COM29 with DFU package D:\Github_Project\NOA_IoT_BACKBONE\nrf5_SDK_for_Mesh_v2.2.0_src\dfu_test.zip. Flow control is enabled.
    [------------------------------------] 0%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
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd


    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...

    ************************************************************************************************/

    And I don't understand what you said created a script

Reply
  • Yes. I have deleted all of  the zip files and re-run step3 and 10. --application-version 4.

    The first DFU was successful, but the second DFU prompted the following error.

    /**********************************************************************************************

    Upgrading target on COM29 with DFU package D:\Github_Project\NOA_IoT_BACKBONE\nrf5_SDK_for_Mesh_v2.2.0_src\dfu_test.zip. Flow control is enabled.
    [------------------------------------] 0%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
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd
    PC -> target: 0502aabbccdd


    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...

    ************************************************************************************************/

    And I don't understand what you said created a script

Children
No Data
Related