Can someone help? I’m trying to configure auto upgrade of the ONT’s but didn’t work.
Here is my preset
And provision
Can someone help? I’m trying to configure auto upgrade of the ONT’s but didn’t work.
Here is my preset
And provision
Hi @marc welcome to genieACS community:
The access log (often /var/log/genieacs/genieacs-cwmp-access.log) is useful to confirm Informs and requests, I think this kind of log is usually the first place to look.
From the screenshots, two things stand out that can fully explain why the auto-upgrade never runs (even if the CPE is online and other actions from the UI work):
1- add at least one event that matches how you want to trigger upgrades (one common choice is 1 BOOT). If you need a quick reference for how GenieACS Preset Events work, this old (but still useful) wiki page explains the idea and lists common event codes: GenieACS GUI wiki “Presets Tab”.
This is consistent with how presets map devices to provisions: presets are what decide when a provision runs.
2- Your precondition is not valid as written. Logs can show you this kind of errors:
You can check logs with “cat /var/log/genieacs/genieacs-cwmp-access.log | grep -i error” or similiar. You have: DeviceID.ProductClass = GN256VE-2
The right side is a string, so it should be quoted, e.g.:
DeviceID.ProductClass = "GN256VE-2"Also watch out for curly quotes (“ ”) if you copied from somewhere; they can break parsing and produce “Precondition must be valid expression” style errors.
Hello Mark,
I hope that you have uploaded the firmware file through the genieacs web gui, otherwise other problems can occur.
this is my upgrade firmware script that I run on “1 BOOT”.
let now = Date.now();
let pc = declare(“DeviceID.ProductClass”, {value: now}).value[0];
let test_fw = declare(“Tags.TEST_FW”, {value: 1});
if (test_fw.value !== undefined) {
pc = “TEST_” + pc;
}
let models = {
“F6600P”: {“sw_gpv”: “Device.DeviceInfo.SoftwareVersion”, “version”: “V9.0.12P28N4”, “filename”: “F6600P_V9.0.12P28N4_FlashV1_UPGRADE_BOOTLDR 1.bin”, “type”: “1 Firmware Upgrade Image”},
“TEST_F6600P”: {“sw_gpv”: “Device.DeviceInfo.SoftwareVersion”, “version”: “V9.0.12P28N4”, “filename”: “F6600P_V9.0.12P28N4_FlashV1_UPGRADE_BOOTLDR 1.bin”, “type”: “1 Firmware Upgrade Image”}
};
let factory = {
“F6600P”: {“fr_version”: “V9.0.12P28N1C”},
“TEST_F6600P”: {“fr_version”: “V9.0.12P28N1C”}
};
if (!models.hasOwnProperty(pc)) {
return;
}
let sw = declare(models[pc][‘sw_gpv’],{value: now}).value[0];
if (sw == models[pc][‘version’]) {
log("Already upgraded to: " + sw);
let factory_reset = declare(“Tags.FactoryReset”, {value: 1});
if (factory_reset.value !== undefined) {
log(‘CPE needs to be Factory Reset!’);
declare(“FactoryReset”, {value: now});
declare(“Tags.FactoryReset”, null, {value: false});
}
return;
}
log(‘Upgrading ’ + models[pc][“type”] +’, version: ’ + models[pc][‘version’] + ', filename: ’ + models[pc][“filename”] + ', type: ’ + models[pc][“type”] + ', previous_version: ’ + sw + ', pc: ’ + pc);
let basePath = “Downloads.[FileType:” + models[pc][“type”] + “]”;
declare(basePath, {path: 1}, {path: 1});
declare(basePath + “.FileName”, {value: 1}, {value: models[pc][“filename”]});
declare(basePath + “.Download”, {value: 1}, {value: now});
if (sw == factory[pc][‘fr_version’]) {
declare(“Tags.FactoryReset”, null, {value: true});
}
First of all, you have to upload de file to genieACS fs:
then I can do the provision:
const now = Date.now();
declare(“Downloads.[FileType:1 Firmware Upgrade Image]”, {path: 1}, {path: 1});
declare(“Downloads.[FileType:1 Firmware Upgrade Image].FileName”, {value: 1}, {value: “arcofer_V1.0.0.3”});
declare(“Downloads.[FileType:1 Firmware Upgrade Image].Download”, {value: 1}, {value: now});
And this is my preset configuration:
Hi, Thank you. My provision is now working.