Skip to content

Commit 38917bf

Browse files
cdjacksonleonschenk
authored andcommitted
Improve debug logging in OTA server (#1377)
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
1 parent a402253 commit 38917bf

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/app/otaserver/ZclOtaUpgradeServer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,9 @@ private boolean handleQueryNextImageCommand(QueryNextImageCommand command) {
737737
&& otaFile.getMaximumHardware() != null) {
738738
if (command.getHardwareVersion() < otaFile.getMinimumHardware()
739739
|| command.getHardwareVersion() > otaFile.getMaximumHardware()) {
740+
logger.debug(
741+
"{} OTA Error: Request is inconsistent with hardware - requested={}, file min={}, file max={}",
742+
command.getHardwareVersion(), otaFile.getMinimumHardware(), otaFile.getMaximumHardware());
740743
sendNoImageAvailableResponse(command);
741744
return true;
742745
}
@@ -745,6 +748,7 @@ private boolean handleQueryNextImageCommand(QueryNextImageCommand command) {
745748
// Some devices may make further requests for files once they have been updated
746749
// By default, don't resend the existing file
747750
if (!allowExistingFile && command.getFileVersion().equals(otaFile.getFileVersion())) {
751+
logger.debug("{} OTA Error: Request is for existing file version {}", command.getFileVersion());
748752
sendNoImageAvailableResponse(command);
749753
return true;
750754
}

com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/app/otaserver/ZigBeeOtaUpgradeExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void nodeAdded(ZigBeeNode node) {
6363

6464
/*
6565
* We've confirmed there is no current application registered, so register the ZclOtaUpgradeServer to the first
66-
* endpoint supplorting OTA upgrades
66+
* endpoint supporting OTA upgrades
6767
*/
6868
for (ZigBeeEndpoint endpoint : node.getEndpoints()) {
6969
if (endpoint.getOutputCluster(ZclOtaUpgradeCluster.CLUSTER_ID) != null) {

0 commit comments

Comments
 (0)