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

How to realize DFU functionality by PyACI?

Dear friends,

I want to realize dfu in 52840 DK by PyACI, i know there should be a bootloader firstly, 

a) I have flash the seiral example(nrf5_SDK_for_Mesh_v5.0.0_src\examples\serial) to 52840 DK.

b) Which bootloader can i used in the DFU, and how to config the serial application to support DFU?

c) I want to dfu my prosioner and node respectively, my prosioner had flashed the serial example(nrf5_SDK_for_Mesh_v5.0.0_src\examples\serial).

Could you give me some advices. thanks you in advance.

  • Hi Oplinux,

    The PyACI was not made for doing DFU. It's more about the serialization from the nRF52 to PC. 

    If you want to do DFU please follow the instruction here.

    The serial bootloader is located at \bin\bootloader. The device connected to PC should be flashed with _serial bootloader. 


    You can also build the bootloader on your own using the \mesh\bootloader  

    c) If you want to do DFU for your provisioner (I assume it's the device connected to PC) you would need to have different application ID so that it's only the provisioner getting updated with provisioner firmware and the node should have different application ID (application_id) . Please refer to the instruction. 

  • Hi Hung,

    Thanks for you reply.

    I have tested the Mesh DFU by the guide Configuring and performing DFU over Mesh .

    a) I flashed the DFU example(examples/dfu/) , the newer app has been upgraded by nrfutil. However, i found the speed is so slow. i think it is caused by retransmitting a DFU packet, right?

    b) I only want to update the source node(e.g. the provisoner) by serial interface, other nodes needn't update, I want to disable the functionality of retransmitting DFU packet  and increase the speed transmit the DFU archive, how to do it?

  • By the way, the process of DFU took about 70 minutes, so slow..... , we only want to update the provisoner by serial  in our project, other nodes are updated by a smartphone.

  • Hi Oplinux, 

    70 minutes is about right. The bootloader is designed to do DFU update for a mesh network. Which means it capable of doing update for 1000s node in this relatively short time. But the draw back is that if you update for only one node like in your case, it will take the same time. 

    To shorten the time to do DFU update for the provisioner, there are two options:
    - Modify the mesh bootloader and the nrfutil for mesh to speed up the time if it only needs to update the provisioner. The bootloader is provided in the SDK in \mesh\bootloader folder. We don't have a SES project for it out of the box. But you can find a SES project for it here.

    - Use the nRF5 bootloader in the nRF5 SDK. This mean you don't use the mesh bootloader and just the normal UART bootloader in nRF5 SDK. This will give you faster speed (like what you do with your other nodes) but will not allow you to do mesh DFU update. If all other nodes in  your network also doesn't support mesh DFU then this would be a good solution. 
    You would need to use nRF Util the generic version , not the mesh version to do DFU update. 

  • Hi Hung,

    Thanks for you reply.

    a)"- Modify the mesh bootloader and the nrfutil for mesh to speed up the time if it only needs to update the provisioner. The bootloader is provided in the SDK in \mesh\bootloader folder. We don't have a SES project for it out of the box. But you can find a SES project for it here."

    In this case, i found the DFU data segment only up to 16 Bytes in the protocol "DFU protocol packet formats ", as the figure shows below,  

    so, i want to insert more data in the field of Data segment, because we only update provisoner. At the same time, for shorten time in the process of DFU,  i want to disable the relay of DFU packet in the provisoner, how to achieve it?

    b) "- Use the nRF5 bootloader in the nRF5 SDK. This mean you don't use the mesh bootloader and just the normal UART bootloader in nRF5 SDK. This will give you faster speed (like what you do with your other nodes) but will not allow you to do mesh DFU update. If all other nodes in  your network also doesn't support mesh DFU then this would be a good solution. "

    In this solution, can I upgrade a mesh application like an app in nRF5 SDK v17.0.2?  If yes, i should use the nRF5 bootloader in the nRF5 SDK, and realize this process by the guide Secure DFU Bootloader over Serial Link (UART/USB)  ?

Related