zsmartsystems / com.zsmartsystems.zigbee

ZigBee Cluster Library Java framework supporting multiple dongles
Eclipse Public License 1.0
141 stars 87 forks source link

Add callback notification if OTA query is received to allow application to respond #1334

Closed cdjackson closed 2 years ago

cdjackson commented 2 years ago

This PR adds a new method to the ZigBeeOtaStatusCallback class that will allow listeners to be notified when the client sends a QueryNextImageResponse. It allows the application to return an OTA file based on the client request.

It should be noted that the listener does not get very long to respond, so if the firmware is not available immediately (within a few hundred milliseconds) then the application should return null and retrieve the firmware asynchronously such that it's ready for next time, or initiate the transfer from the server with the setFirmware method.

Signed-off-by: Chris Jackson chris@cd-jackson.com