After the Bluetooth mesh dfu is completed, the distribution network information of the node is cleared

I have implemented DFU functionality in my Bluetooth mesh project and used device A as the distributor and device B as the node to be updated. I have already configured both devices and they can communicate with each other. Then I use the distributor to send new firmware to the node. After the node firmware is successfully updated, the original distribution network information of the node is cleared. At this point, the distributor and the node cannot communicate and need to manually reconfigure the distribution network. How can the original distribution network data be retained during DFU updates?

  • Hi Illy, 

    Let's call the current firmware running on the device is A. The new firmware you compile to do DFU update is B. 
    What change to do you make to B ? When it work when it doesn't work ? 

    If you add the vendor customized to A when you build A and flash to the device. Do you have any problem when you update the firmware and build B ? 

    I don't see the reason why hash value change if you don't change the model/composition data. 

  • Firmware B only modified the version number to check if the DFU was successful.

    When adding a custom model, the hash in the upgrade package when building a is already incorrect, rather than obtaining the wrong hash after making other modifications to the firmware

    In the simplest terms, adding a custom model will result in incorrect hash values,this no longer requires DFU to verify

    The screenshot above shows the upgrade package obtained after adding the manufacturer's custom model. It can be seen that "composition_hash" is 0xdb33f61b,this is an incorrect value

    This image is the hash value I manually calculated using the shell command. The correct hash value should be 0xbcce424f

    As long as there is a custom model, the problem of obtaining different hash values through two methods will occur, which has nothing to do with the DFU process and is a problem that occurs during construction.Is my description clear enough?

  • Hi Illy, 
    We will need to check if you have declared your model correctly. 
    Could you show us how you define it  ?
    Have you tried to test with for example the chat sample in our SDK ? To see if you also have the wrong metadata ? 
    I would suggest to follow exactly the way we declare the model in the samples. 

  • I added the manufacturer's custom model in the same way as in the mesh_demo example

    And I tested it with the mesh chat example, I didn't make any changes, but the hash value in the upgrade package is still inconsistent with the calculated hash value. Can you test it yourself?

  • Hi Illy, 
    Could you send me the project files you used to compile the mesh chat sample ? By default it doesn't support DFU, right ?

Related