I’m trying to build a routine to upgrade some CPEs but i can’t find a way to start the process.
Provision firmware-upgrade:
const TAG_UPGRADE = "Tags.upgrade";
const TAG_UPGRADING = "Tags.upgrading";
const REQ_VERSION = "S3.1.320.img";
if (declare(TAG_UPGRADE, {value: 1}).value !== undefined) {
// remove upgrade tag
declare(TAG_UPGRADE, null, {value: false});
commit();
// retrieve CPE software version
let REP_VERSION =
declare("InternetGatewayDevice.DeviceInfo.SoftwareVersion", {value:
Date.now()}).value[0];
// make sure versions do not match
if (REP_VERSION !== REQ_VERSION) {
// append upgrading tag (will be removed in firmware-upgrade-complete)
declare(TAG_UPGRADING, null, {value: true});
commit();
// request upgrade
declare("Downloads.[FileType:1 Firmware Upgrade Image]", {path:
1}, {path: 1});
declare("Downloads.[FileType:1 Firmware Upgrade Image].FileName",
{value: 1}, {value: REQ_VERSION + ".web"});
declare("Downloads.[FileType:1 Firmware Upgrade Image].Download",
{value: 1}, {value: Date.now()});
}
}
Provision firmware-upgrade-complete:
const TAG_UPGRADING = "Tags.upgrading";
declare(TAG_UPGRADING, null, {value: false});
Presets:
firmware-upgrade-complete
Events = 7 TRANSFER COMPLETE
Precondition = Tag = upgrading
Provision = firmware-upgrade-complete
The CPEs are online but still the upgrade won’t start.