aboutsummaryrefslogtreecommitdiffstats
path: root/unattended-lte-firmware-upgrade
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-08-04 00:41:16 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-08-05 22:58:54 +0200
commite31a99a301cb61433b21f138b1dbe00469bee9b1 (patch)
tree99374b3b445c84f4629e532f65af82f97da24db5 /unattended-lte-firmware-upgrade
parent50d7e1fa41b8f8a6a1379de5521798346fd1ae9f (diff)
unattended-lte-firmware-upgrade: try without extra reset
Testing with R11e-LTE6 I can see the interface being reset by the upgrade. So the extra reset is no longer required? Trying without.
Diffstat (limited to 'unattended-lte-firmware-upgrade')
-rw-r--r--unattended-lte-firmware-upgrade12
1 files changed, 9 insertions, 3 deletions
diff --git a/unattended-lte-firmware-upgrade b/unattended-lte-firmware-upgrade
index d38b917..087e32d 100644
--- a/unattended-lte-firmware-upgrade
+++ b/unattended-lte-firmware-upgrade
@@ -18,16 +18,22 @@
:if ([ :typeof $Firmware ] = "array") do={
:if (($Firmware->"installed") != ($Firmware->"latest")) do={
:log info ("Scheduling LTE firmware upgrade for interface " . $IntName . ".");
+
:global LTEFirmwareUpgrade do={
:global LTEFirmwareUpgrade;
:set LTEFirmwareUpgrade;
+
/system/scheduler/remove ($1 . "-firmware-upgrade");
/interface/lte/firmware-upgrade $1 upgrade=yes;
- :log info ("LTE firmware upgrade finished, waiting for installation before reset.");
+ :log info ("LTE firmware upgrade on '" . $1 . "' finished, waiting for reset.");
:delay 150s;
- /interface/lte/at-chat $1 input="AT+RESET";
- :log info ("Reset device, waiting to finish and reconnect.");
+ :local Firmware [ /interface/lte/firmware-upgrade $1 once as-value ];
+ :if (($Firmware->"installed") != ($Firmware->"latest")) do={
+ :log warning ("LTE firmware versions still differ. Resetting again...");
+ /interface/lte/at-chat $1 input="AT+RESET";
+ }
}
+
/system/scheduler/add name=($IntName . "-firmware-upgrade") start-time=startup interval=2s \
on-event=(":global LTEFirmwareUpgrade; \$LTEFirmwareUpgrade \"" . $IntName . "\";");
} else={