Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Child pages (Children Display)
alltrue
pageHow to Use the OTA API

The Upgrade Policy API allows us to specify wether we can perform upgrades or downgrades. The upgrade policy object is created using the UpgradePolicyBuilder, by specifying setAllowUpgrade (to allow upgrades), setAllowDowngrade (to allow downgrades) and setAllowAllUpgrades (to allow all OTA upgrades and downgrades on all devices, as aligned with the ZigBee specification).

...

Code Block
languagejava
UpgradePolicyBuilder builder = new UpgradePolicyBuilder();

// allowUpgrade can be true or false
builder.setAllowUpgrade(allowUpgrade);

// allowUpgrade can be true or false
builder.setAllowDowngrade(allowDowngrade);

// allowAllUpgrades can be true or false
builder.setAllowAllUpgrades(allowAllUpgrades);

UpgradePolicy policy = builder.create();

gw.getInternalOtaHandler().setOtaUpgradePolicy(policy);

Related Articles

...