The Z-Ware C API allows for OTA updates of devices. This article provides an example of how to use it.
zwif_fw_info_get() should first be called to find information about the device and then zwif_fw_updt_req() should be called to perform the update. Each of those functions has callbacks that must be implemented.
The example provided is based on the existing bin_switch demo. It finds the first binary switch node and then allows that node to be updated by adding an additional menu option to do so.
Two places in the code were modified from the plain bin_switch demo. Inside the bin_sw_intf_get() function an additional option to find the firmware update interface was added. The callbacks were added and the main function was modified to add menu option 3 to perform the update.
To run the demo make sure you have a firmware image (.gbl or .otz file) for the binary switch end device example in the same directory as the executable.