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

Coexistence between pyACI and DFU

Hi,

We are currently implementing a mesh application that is expected to have a large number of mesh devices. We have already tested DFU on a smaller mesh and it is working well with our application. However, we want to use a serial provisioning through pyACI since there is a device connected to a computer, this device was in charge of starting the DFU and sending the new firmwares through the mesh.

We have seen there are some serial commands related to DFU in the documentation and they are implemented in some methods of the interactive pyACI (aci_cmd.py) but we can't find any documentation on how to use those methods. We used to do DFU through the nrfutil mesh version while collecting the mesh sensors data, and would like to have similar functionality using serial commands.

We have seen a couple of answers in this forum suggesting that this behaviour is achievable, like this.

We would like to know if it is possible to carry out DFU through the pyACI application or if there is a better approach and if there is any documentation available.

Thank you

Parents
  • Hi.

    I've got some feedback from our Mesh team;

    For the transport part, it shouldn't be too hard for someone that’s proficient in Python.

    All the mesh DFU transport logic is contained in one file:
    https://github.com/NordicSemiconductor/pc-nrfutil/blob/mesh_dfu/nordicsemi/dfu/dfu_transport_mesh.py

    The logic is quite shallow, and most of the complexity in this module comes from building packets and handling responses correctly.
    The response handling is already handled by pyACI, and the packet building is easy to copy from one of the existing pyACI modules.

    The tricky bit might be handling of the DFU package objects. You will need this for generating the signature and storing all the metadata. But you could do this with the existing script (as that generates a .zip that you can move around), and simply copy over the modules that parses the zip file contents. Since this part is disconnected from the transport code, it can be copied over more or less as-is without interfering with the rest of pyACI.

    Note that pc-nrfutil is implemented in Python 2.7, which could generate some compatibility issues, particularly around packing/unpacking the .zip-file and its contents.

    Hope that is helpful for you.
    Best regards,
    Joakim.

Reply
  • Hi.

    I've got some feedback from our Mesh team;

    For the transport part, it shouldn't be too hard for someone that’s proficient in Python.

    All the mesh DFU transport logic is contained in one file:
    https://github.com/NordicSemiconductor/pc-nrfutil/blob/mesh_dfu/nordicsemi/dfu/dfu_transport_mesh.py

    The logic is quite shallow, and most of the complexity in this module comes from building packets and handling responses correctly.
    The response handling is already handled by pyACI, and the packet building is easy to copy from one of the existing pyACI modules.

    The tricky bit might be handling of the DFU package objects. You will need this for generating the signature and storing all the metadata. But you could do this with the existing script (as that generates a .zip that you can move around), and simply copy over the modules that parses the zip file contents. Since this part is disconnected from the transport code, it can be copied over more or less as-is without interfering with the rest of pyACI.

    Note that pc-nrfutil is implemented in Python 2.7, which could generate some compatibility issues, particularly around packing/unpacking the .zip-file and its contents.

    Hope that is helpful for you.
    Best regards,
    Joakim.

Children
No Data
Related