Events trigger order

Hi,

I am having some problems triggering events in the correct order.

I have a factory reset preset which I want to run on Inform; informEvent="0 BOOTSTRAP,1 BOOT"

This works fine, the CPE does the factory reset and reboots itself, and a “FRS” tag is added to the device. After this the first inform is: Inform; informEvent="1 BOOT,0 BOOTSTRAP"

I am triggering on this to start the provisioning of the device but only after the factory reset is done.

The factory reset preset is triggered for even “0 BOOTSTRAP, 1 BOOT” plus check for the “FRS” tag is missing.
The provisioning preset is triggered for event “1 BOOT,0 BOOTSTRAP” plus check for the “FRS” tag to be true.

Yet, 2-3 seconds after the factory reset preset is started, the provisioning preset is also started.

Question one:
Apparently there is no different between events “0 BOOTSTRAP, 1 BOOT” and “1 BOOT,0 BOOTSTRAP” for GenieACS ?

Question two:
How else can I trigger the provision script to only run after the factory reset is done? Apparently events and tags are not enough, maybe there is another way?

Much appreciate any and all help.

The factory reset is “done” when the CPE informs 0 BOOTSTRAP. What is the issue you are trying to actually solve?

This is accurate.

The factory reset is “done” when the CPE informs 0 BOOTSTRAP.

The problem is apparently that is the response when the CPE first connects to the ACS, and also the response after a factory reset.

What is the issue you are trying to actually solve?

I try to resolve the issue to do a factory reset when the device first connects to the ACS. This part actually works triggering on the “0 BOOTSTRAP” event.

And after the factory reset is done, I want to trigger the provisioning of the CPE. The problem is: currently the factory reset and the provisioning is triggered at the same time, and not atfer one another. And becuase the prov is started while the devices is doing the factory reset, the device provisioning fails.

Are there any errors that happen when the CPE sends a 0 BOOTSTRAP? Per the spec, the CPE is required to resend events if a fault is encountered during the process.

I dont think the issue is on the CPE side.

The ACS sends the factory reset on “0 BOOTSTRAP,1 BOOT”:

Inform; cpeRequestId="37" informEvent="0 BOOTSTRAP,1 BOOT"
Script: factory reset command sent to ONT!

2-4 seconds later the ACS tries to provision the CPE while it is already factory resetting:

Script: ONT provision for SN: 485754430AD6C29B

This fails obviously, as the CPE is already doing the reboot after the factory reset:

Channel has faulted; channel="provision" retries=0 faultCode="session_terminated" faultMessage="The TR-069 session was unsuccessfully terminated"

So the question is: should the ACS retry the failed “provision” preset after the CPE finished the factory reset and reachable again?

And more importantly: how to trigger the provision preset preferably not in the middle of the factory reset already ongoing? As this is the root cause of the issue: the ACS tries to provision during a factory reset ongoing.

If your router is sending a 0 BOOTSTRAP while it still in the process of doing a factory reset, then it is the issue. Every CPE I’ve encountered sends 0 BOOTSTRAP after its done doing a factory reset.

As for why the event is ocuring multiple times, its because of this error message:

There is a misunderstanding here:

The first “0 BOOTSTRAP” event is happening because the ONT received the TR-069 server parameters from the OLT. As much as I know, when the TR-069 URL changes on the ONT, it is normal to report a “0 BOOTSTRAP” event although this is not an actual factory reset as only the TR-069 parameters of the ONT are changing here.

So for the above “0 BOOTSTRAP” event I trigger the “actual” factory reset, and of course as you said it, this results in a second “0 BOOTSTRAP” report once the ONT finished the factory reset.

The problem is that during the “actual” factory reset is ongoing, the provision script is also triggered, which fails as the ONT is already undergoing the reboot part for the factory reset → no ACS connection → the prov preset fails.

Okay, so now I understand better what the actual issue is. Here is a provision flow that will work:

Create a preset tied to 0 BOOTSTRAP which kicks off the Bootstrap provision script. If you installed GenieACS at v1.2 or later this is already done for you. Modify the Bootstrap script to add this line:

declare('Tags.Provisioned', null, {value: false});

Create a second preset with an event of -0 BOOSTRAP with a precondition of Tags.Provisioned IS NULL and this will kick off your provision script.

This is the exact process we use. Most of the info in the wiki article came directly or indirectly from me :slight_smile:.

Much appreciate your help! Most of the things I figured out was mostly based on your responses on this forum. :slight_smile:

One question: how will the second preset trigger if I set the precondition to " -0 BOOSTRAP" and the ONT comes back with “1 BOOT,0 BOOTSTRAP” after the “actual” factory reset? Just trying to better understand this, but if you say it will trigger, I believe you :slight_smile:

1 Like

Ahh, so I forgot to mention that. I configure all of our CPEs with the lowest possible PeriodicInformInterval possible. For some of my CPEs its set to 5 seconds. Others 30 seconds. So when the CPE does another 2 PERIODIC the provisioning process continues. At the end of the provisioning process I set the inform interval to 3600 seconds (1 hr).

1 Like

In my case the PeriodicInformInterval is 60 seconds (there is a good reason behind this frequent polling rate), and I think your “-0 BOOTSTRAP” event worked correctly: it eliminated the prov to be triggered during the factory reset, and after the factory reset it got triggered and the device is provisioned successfully.

Will play with this in various scenarios, but I think it works as intended. Thanks again!
PS: I have a problematic Sagemcom ONT so I might pop up in another thread :slight_smile:

1 Like