<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Dan,<br>
<br>
Please find my answers below.<br>
<br>
On 05/03/2018 12:05 AM, Dan Morphis wrote:<br>
<blockquote type="cite"
cite="mid:CAHwrMLfmrB2vD6NWos3OFEAJBmP-OMf8CPuLkz=Am7K0JX8Z6w@mail.gmail.com">
<div dir="ltr"><span class=""></span><br>
<span class=""></span>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class="">
<br>
</span>This is how the preset looked before:<br>
<br>
{<br>
"_id" : "firmware-upgrade",<br>
"channel" : "",<br>
"weight" : 0,<br>
"precondition" : "{\"_tags\":\"upgrade\"}",<br>
"configurations" : [<br>
{<br>
"type" : "provision",<br>
"name" : "firmware-upgrade"<br>
}<br>
],<br>
"schedule" : "",<br>
"events" : {<br>
"1 BOOT" : true<br>
}<br>
}<br>
</blockquote>
<div><br>
</div>
<div>So this creates a preset in the default channel with a
precondition of 1 BOOT and a tag of upgrade. For this to
execute, the CPE must have the upgrade tag, the channel
default must not be in a faulted state for the CPE and had
to have just booted. <br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
All of these were true except maybe channel faulted state which I
didn't check. Will give it a try.<br>
<br>
<blockquote type="cite"
cite="mid:CAHwrMLfmrB2vD6NWos3OFEAJBmP-OMf8CPuLkz=Am7K0JX8Z6w@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Then I replaced "1 BOOT" with "2 PERIODIC" and now it
works like a charm<br>
but with periodic event. I am not sure regarding the
channel's faulted<br>
state, but I'll give it a try once again. In general, is
it a good<br>
practice to put firmware-upgrade/firmware-<wbr>upgrade-complete
presets in a<br>
separate channel?<br>
<br>
</blockquote>
<div>What provision do you want to upgrade after a firmware
upgrade? Setting the config? If the CPE needs its config,
it (should) will send a 0 BOOTSTRAP event. In all the CPEs
I've tested, that will happen if you update the config on
the CPE.</div>
</div>
</div>
</div>
</blockquote>
<br>
a very simple provision - untag a CPE and reboot:<br>
<br>
const tag = "Tags.upgrade";<br>
declare(tag, null, {value: false});<br>
declare("Reboot", null, {value: Date.now()});<br>
<br>
<blockquote type="cite"
cite="mid:CAHwrMLfmrB2vD6NWos3OFEAJBmP-OMf8CPuLkz=Am7K0JX8Z6w@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
I forgot to ask one question regarding log() in
provisions: while my<br>
provision contains log() statements, I don't see output in
logs. Should<br>
I enable debugging to see the output and which file logs
are written to?<br>
<br>
</blockquote>
<div>Yes, it should be in the cwmp log file.<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
Thanks for your support.<br>
<br>
Best regards,<br>
<br>
George Chelidze<br>
</body>
</html>