I am trying to update/upgrade CPE, using API, with this command
curl -i ‘http://localhost:7557/devices/00236a-SR552n-SR552NA084%252D0003269/tasks?timeout=3000&connection_request’
-X POST
–data ‘{“name”: “download”, “file”: “mipsbe-6-42-lite.xml”}’
but I don’t know how to track the status of this request if it is in progress/ done/ fail.
so is there any way to track the status of it ?
It’s all in the Fine Manual:
https://docs.genieacs.com/en/stable/provisions.html
What you are looking for is to create a preset for a specific event and a provision to answer to that preset. Also read the TR069 specs about the subject.
Are you absolutely sure you need this? I been using Genieacs over a year now and I never had to do that for normal operation.
thanks for reply, actually I am using the Genieacs API to allow my customer to upload and uthe pgrade framework, actually I am not using the genieacs system directly, I am using the API, so I want to get the status of the upgrading file, if it is done or not, or it is still in progress.
I see there is event 7 Transfer Complete and I can use that event for success uploading, but what about the failer and the reason for the failer? how can I decide if it is failed or not?
it’s an asynchronous operation so to your original question, the answer is no.
again, you need a provision.
Use a tags for successful and another for failure (that’s what we did for diagnostics but ended up being ignored from the system perspective). To determine which tag you use you need to check for a specific parameter inside a provision.
In our case, for diagnostics we use InternetGatewayDevice.DownloadDiagnostics.DiagnosticsState
One of the downsides to the TR069 spec is events like 7 TRANSFER COMPLETE
or 8 DIAGNOSTICS COMPLETE
do not return any information (that I’ve found) about what was actually done (what was transferred, what diag was performed). So you will have to track that state somehow.
For downloads, GenieACS tracks this information in the Downloads
parameter.
Downloads
Downloads.1
Downloads.1.CompleteTime 12/31/1969, 2:00:00 PM
Downloads.1.Download 12/31/1969, 2:00:00 PM
Downloads.1.FileName SomeFileName.conf
Downloads.1.FileType 3 Vendor Configuration File
Downloads.1.LastDownload 12/31/1969, 2:00:00 PM
Downloads.1.LastFileName
Downloads.1.LastFileType
Downloads.1.LastTargetFileName
Downloads.1.StartTime 12/31/1969, 2:00:00 PM
Downloads.1.TargetFileName
Downloads.2
Downloads.2.CompleteTime 8/28/2020, 3:13:55 AM
Downloads.2.Download 8/28/2020, 11:13:26 AM
Downloads.2.FileName CA_PBCA_2.6.2.6_b9f0d7e19_SR555ac_nand_fs_image_128_jffs2.w
Downloads.2.FileType 1 Firmware Upgrade Image
Downloads.2.LastDownload 8/28/2020, 11:13:26 AM
Downloads.2.LastFileName CA_PBCA_2.6.2.4_d553117_SR555ac_nand_fs_image_128_jffs2.w
Downloads.2.LastFileType 1 Firmware Upgrade Image
Downloads.2.LastTargetFileName
Downloads.2.StartTime 8/28/2020, 3:13:40 AM
Downloads.2.TargetFileName
Downloads.3
Downloads.3.CompleteTime 10/19/2020, 7:25:14 AM
Downloads.3.Download 10/19/2020, 3:25:14 PM
Downloads.3.FileName AlaskaPowerTel_SR555ac_with_vdsl_adsl_ptm_v5.conf
Downloads.3.FileType 3 Vendor Configuration File
Downloads.3.LastDownload 10/19/2020, 3:25:14 PM
Downloads.3.LastFileName AnotherConfigFille.conf
Downloads.3.LastFileType 3 Vendor Configuration File
Downloads.3.LastTargetFileName
Downloads.3.StartTime 10/19/2020, 7:25:13 AM
Downloads.3.TargetFileName