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

Reply
  • 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

Children
  • 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

  • I am very sorry, because I can see your reply next week.

    I want to ask a question here, I run the Mesh light_switch routine.

    Data can only be bidirectional from server to client. It can't be from the server to the server, or the client. I tried to read the client and server code and found it difficult and took a lot of time.

    I would like to ask if there is a corresponding example, sent directly from the client to the client.

  • I will test the dfu functionality with two 52840 dks & get back to you on that. Why should the server not be able to send an acknowledged message to another server? That way, a server sends a set message to another server for example & the receiving server will respond to the sender with a status message.

    Right now, the light switch server example is setup to send a status message back to the client, but you should be able to update that to send a reliable unicast message to another server. What you could do is add the generic on off client model in the light switch server example. A similar example is shown here, where I have updated the light switch example to be both a server & a client (by adding the generic on off client model in the server example). By provisioning via the nRF Mesh app (available for Android & iOS), you are able to use the device as both a light switch & a light (i.e. client or server). Just beware that the example uses a slightly simplified version of the "generic on off model". Therefore, I would use the github example as a good starting point, but maybe rather update the mesh sdk v2.2.0 light switch example to achieve the same thing.

    If you want a quick way to send messages from one client to another client, I would test out the github code. There are two pdfs that show the testing guidelines.

    I agree that Bluetooth Mesh is not the simplest of things to learn. I have spent quite a lot of time supporting Bluetooth Mesh & there are definitely easier examples to understand. ;) 

  •      Thank you very much for your reply and look forward to your testing of the NRF52840 Mesh.

         I will try to modify the code to implement server to server communication, or client and client communication

Related