Firmware Update Stopped Working

I have a firmware update script that runs on 1 BOOT, which upgrades my devices to the newest version I have, it is not a very complicated script, and it was working for months, applying the firmware after I applied the TR069 settings in the router. But now I’m having issues and I receive a fault cwmp.9002 after the transfer is complete apparently.

Here is the firmware update script:

const now = Date.now();
const v86 = "V1.1.086_20220214095753_XGS_local.img";
const v91 = "V1.1.091_20220331094251_XGS_local.img";

log('firmware v91 update script executing...')
declare("Downloads.[FileType:1 Firmware Upgrade Image]", {path: 1}, {path: 1});
declare("Downloads.[FileType:1 Firmware Upgrade Image].FileName", {value: 1}, {value: v91}); declare("Downloads.[FileType:1 Firmware Upgrade Image].Download", {value: 1}, {value: now});

log('END FIRMWARE')

Followed by a reboot script that is called on 7 TRANSFER COMPLETE

log("Rebooting!!");
declare("Reboot", null, {value: Date.now()});

And lastly the output of genieacs-cwmp-access.log:

AZRS6F47EF9E: Script: firmware v91 update script executing…
AZRS6F47EF9E: Script: END FIRMWARE
AZRS6F47EF9E: Script: Rebooting!!
AZRS6F47EF9E: ACS request; acsRequestId=“18186fafc7c0000” acsRequestName=“Download” acsRequestCommandKey=“18186fafc7c0000”
AZRS6F47EF9E: Missing or invalid XML node; element=“StartTime”
AZRS6F47EF9E: Missing or invalid XML node; element=“CompleteTime”
AZRS6F47EF9E: ACS request; acsRequestId=“18186fafc7c0001” acsRequestName=“Reboot”
AZRS6F47EF9E: Script: Rebooting!!
AZRS6F47EF9E: Inform; cpeRequestId=“1626849438” informEvent=“7 TRANSFER COMPLETE” informRetryCount=0
AZRS6F47EF9E: CPE request; cpeRequestId=“transfercomplete” cpeRequestName=“TransferComplete” cpeRequestCommandKey=“18186fafc7c0000”
AZRS6F47EF9E: Channel has faulted; channel=“firmware” retries=1 faultCode=“cwmp.9002” faultMessage=“Internal error”

I suspect it might have something to do with the StartTime and CompleteTime? But I haven’t changed anything I would’ve though would break this.

Thanks in advance!

The faultMessage tells you exactly whats wrong:

Internal error

This error is internal to the CPE. You will need to look in syslog on the device, and if you don’t see anything, then you will need to pull the cover off of one and connect a console cable to see the messages spit out to the serial console.

-dan

1 Like

It appeared to be a problem with the ubuntu firewall running on the genie server, ufw. I was allowing ports 7547 and 3000 through, which apparently wasn’t enough. So I then allowed all internet traffic from trusted IPs instead of just those ports which fixed the issue.

Allowing all traffic is not the correct approach. You want to allow port 7547 (CWMP), 7557 (nbi - if you use the API), and 7567 (fs) for CPE management.

1 Like

Ok I got it working, with 7547, 7557, 7567 and 3000 allowed for my IPs. Thanks for the help!

@cingelj16

Could you share the entire script for an update routine?