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

how to use the DFU example?

hi,everyone

I want to  run the DFU example in  meshV3.1.0 . but i still can't understader how to run it . below is my understanding:

1.ther are must have 2 devices , A device use serial interface communicate with PC , B device is the targer device to upgrade.

2.PC send packet to A by serial , and A send packet to B by mesh network.

3.in order to send hex data in specially format like below , nordic supply a kit name  nrfutil

4.how to use nrfutil? where I can type those COMMED , i am using Windows cmd.exe.when i type in the command below ,it seems doest work like below :

  • Hello,

    Can you test one thing for me:

    Can you type:

    nrfutil version

    What does it say then?

    If you have the correct version (0.3.0.0 or something similar), then you should be able to use the command. I see that you are missing a "keys" in your command:

    nrfutil keys --gen-key private_key.txt

    However, it looks like you have installed the non-mesh version of nrfutil. If it says 5.1.0 or something similar, this is the non-mesh version. I suggest you uninstall this, and then install the mesh version of nrfutil, which you can find here:

    https://github.com/NordicSemiconductor/pc-nrfutil/tree/mesh_dfu

    Best regards,

    Edvin

  • thank you,it is useful,

    i use the right branch ,and the command line is works now! but when I transmit the PDU packet , it shows below:

    1.the first board i burned the light_switc_provisioner  image,and used the serial interface,

    2.the second board i burned the light_switch_server image ,copy some code from example\dfu ,is that ok?

    3.do both need burned the same device_page.hex? and i am not use JLINK COM ,i use the tx/rx on chip

     thank you!

  • 1. Yes, but I believe you need to add some serial DFU part to this project.

    2. Yes, but you have to copy the correct parts.

    3. Yes. They do.

    1, 2 and 3: You also need to program the bootloader for this to work.

    I suggest you try out this guide first, to get started. When you have everything up and running on the DFU front, you can try to merge the dfu parts and program the bootloader together with your custom application.

    You can flash two devices with the same FW in this guide, and push the update to one of them, and it will transfer it to the other over Mesh.

    BR,

    Edvin

  • 1.I tryed this , but still not work . Flash the two devices with the same FW (example\dfu ), but they  both need to provision, are they? when I flash the example\dfu , the mobile phone app can not discover them.

    2.and I do the last step to see if the bootloader  is working correctly ? and it show not ok:

    i flash this " mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex " ,  I use SES

  • 1: no. They do not need provisioning for the DFU procedure to work. The phone can't discover them because they do not advertise with the proxy service, which is used for the provisioning process.

    2: Try the following:

    Before trying the troubleshooting: bootloader_verify, can you try to write nrfutil --verbose dfu serial -pkg <your DFU image.zip> -p <COM Port> -b 115200 -fc --mesh, like described right before the troubleshooting section here:

    https://www.nordicsemi.com/DocLib/Content/SDK_Doc/Mesh_SDK/v3-1-0/md_doc_getting_started_dfu_quick_start

    So add the "--verbose" argument.

    What does it say then?

    When you try the bootloader_verify:

    can you check what python version you are using? Type "python --version" in your cmd window.

    also, what nrfutil version do you have? 

    Try: "nrfutil version" in your cmd window.

    Best regards,

    Edvin

Related