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

[OTA] OTA Zigbee from bootloader

Hi guys,

I am trying to add some BLE OTA functions to my NRF52833 running Zigbee. I have looked into the examples in the SDK, and i can see that there is an example for Zigbee OTA server to use BLE to get the flash image and then distribute to the children in its Zigbee mesh. However, I do not want to use Zigbee because it sounds very slow and error proned.

So, my question is that is it possible for the NRF52833 running Zigbee to update the firmware with BLE OTA only (like get the image and then update to the internal flash). Does running 2 type of communications at the same causes any possible error. The firmware i want to update is about 270kB. 

Thanks you and please reply soon

  • Hi,

    If you want to use both Zigbee and BLE in your application, you'll have to implement dynamic multiprotocol. With this you can run multiple radio protocols in your application, and it works by time-slicing the radio hardware between all protocols. When using this there are some considerations you have to think about, which you can find here. One of them is that BLE has priority over Zigbee, and therefore it might interrupt Zigbee stack logic. It's also recommended to use Sleepy End Device when BLE scanning is used (see power saving for ZED). In your case, you should also be aware that flash operations require more time to complete, and may be performed only in a free timeslot, so it has to wait for the current timeslot to finish before being performed. 

    We already have some multiprotocol examples in the SDK, so I recommend taking a look at them in order to see how it's been implemented there. Please note that nRF5 SDK for Thread and Zigbee v4.1.0 is based on nRF5 SDK v16.0.0, and using another version of the SDK might cause errors. You can also transform any BLE peripheral example in nRF5 SDK v16.0.0 into a BLE-Zigbee multiprotocol example (see adding dynamic multiprotocol Zigbee support to BLE examples).

    Best regards,

    Marte

  • Thank you for your answer.

    So I was thinking because I only need to use BLE for a short time when doing OTA update, can i just turn off Zigbee and turn on BLE when updating then turn on zigbee and turn off BLE when the device are not in updating.  If it is possible, where can i look for some references (like example or document) ?

  • Hi,

    What you're describing would be switched multiprotocol, which I'm afraid is only supported on Thread in the SDK.

    Best regards,

    Marte

  • Thank you, I may try to use dynamic multiprotocol.

    But I just have another question, after reading some of the documents and examples, i can see this part in here https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fzigbee_example_ota_server.html

    The Zigbee OTA Upgrade Server example accepts:

    • application upgrade version for self-upgrade, and
    • Zigbee images that contain an application which contains the Zigbee stack.

    But i do not know how to upload the application for the Server to do self upgrade anywhere. So I have another question: what will i have to do to make the Zigbee OTA server to do self updating?

    Thanks in advance and best regards,

    Tu

  • Hi Tu,

    Installing a new OTA upgrade server application image is done by the bootloader, a slightly modified version of the BLE Secure DFU Bootloader, which installs the firmware in the background so the server can stay connected to the Zigbee network while this happens.

    You should take a look at the code found in examples/zigbee/ota/experimental_server/main.c. There, you'll find a function for handling the self-upgrade DFU process (ble_transport_disable). After the update, you can reset the OTA server with the function reset_ota_server, and the background DFU bootloader will apply the new firmware.

    You can also use the BLE bootloader, but then the bootloader will reboot in DFU mode, and the device will therefore disconnect from the Zigbee network and stop running the application while the bootloader performs the DFU.

    Best regards,

    Marte

Related