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

Mesh DFU and PB-GATT timing problem

Hi!

I gave up trying to come up with a working solution for updating mesh nodes based on SDK1.0 to SDK2, see https://devzone.nordicsemi.com/f/nordic-q-a/37707/dfu-update-mesh-sdk-v1-0-0-to-v2-x , and reflashed my nodes manually in a jig.

In my new generation of FW I naturally wanted to take advantage of the PB-GATT functionality introduced in SDK2. So far I have created a working mesh net with 20 nodes that I provisioned and configured using the nRF Mesh Android app.

I now have two problems, the first (for which I will probably create another ticket :-) is that it doesn't seem to be a good idea to have nodes with several application versions in your mesh net. The beacon_set(BEACON_TYPE_FWID) call in the bootloader seems to put nodes in states where they either want to relay FW or wait for the first higher FW version they encounter. This makes it hard to flash a version 5 if you have nodes beaconing FWID with versions 1,2,3 and 4 in the net...

I can probably work around that by unplugging nodes to only have nodes with the a common FW version alive simultaneously.

My real DFU problem is that in bearer_handler.c / action_switch() there is never enough available time to perform a flash page erase operation.

My server FW  is a customized combination of the light switch server + dfu + GATT proxy examples. I can do a DFU update if I don't include the GATT proxy functionality in the startup code, but as soon as I add GATT proxy it will fail.

The DFU update starts and the bootloader requests the application to erase the necessary space at the bank address. Then the update sequence will hang because bearer_handler.c / action_switch()  will never find time to erase a single page and thus never calls mesh_flash.c / erase_as_much_as_possible().

I tried calling proxy_disable() when I get DFU_START in the application, but that doesn't seem to free up more available time. What do you suggest I do to temporarily turn off the GATT proxy to reclaim enough time to perform the DFU flash operations?

Thanks in advance,
Pär-Olof

Parents
  • Hi again

    I moved the proxy_disable() call earlier in the update process. If I do proxy_disable() in the application when receiving NRF_MESH_EVT_DFU_FIRMWARE_OUTDATED_NO_AUTH it works OK.

    This also solves the problem I was seeing with having several FW versions in the net. The root cause of my problem was that updates never started because of the flash erase problem.

    Hopefully somebody else learnt something from my mistake :-)

    BR,

    Pär-Olof

Reply
  • Hi again

    I moved the proxy_disable() call earlier in the update process. If I do proxy_disable() in the application when receiving NRF_MESH_EVT_DFU_FIRMWARE_OUTDATED_NO_AUTH it works OK.

    This also solves the problem I was seeing with having several FW versions in the net. The root cause of my problem was that updates never started because of the flash erase problem.

    Hopefully somebody else learnt something from my mistake :-)

    BR,

    Pär-Olof

Children
No Data
Related