Update configuration after first updating firmware

Inserted or changed with LCOS 8.50

This scenario describes a potential situation within a project whereby a firmware update is to be carried out followed by an update of the configuration by script.

Requirements:

Configuration:

  1. Specify the path that the 'LoadFirmware' command uses to source the upload if no other parameters are available. For example, enter the following command to load the firmware from an HTTP server:
    set /setup/Setup/Autoload/Network/Firmware/URL http://www.mycompany.de/firmware
  2. Set the conditions for loading the firmware such that only firmware that is newer than that in the device is loaded:
    set /Setup/Autoload/Network/Firmware/Condition if-newer 
  3. Specify the path that the 'LoadConfig' command uses to source the upload if no other parameters are available. For example, enter the following command to load the configuration from an HTTP server:
    set /setup/Setup/Autoload/Network/Firmware/URL http://www.mycompany.de/configuration 
  4. Set the conditions for loading the configuration such that only a configuration that is different from that in the device is loaded:
    set /Setup/Autoload/Network/Config/Condition if-different 
  5. Create a cron job that regularly runs the command 'LoadFIRMWARE' every 10 minutes:
    cd /Setup/Config/Cron-Table 
    set 1 * * * 10 * * * * LoadFirmware
  6. Create a cron job that regularly runs the command 'LoadScript' every 10 minutes:
    set 2 * * * 10 * * * * LoadScript\ $__SERIALNO-$__FWVERSION.lcs

The result:

With this configuration, the device always initially loads the latest firmware.

If the device executes the command 'LoadScript' after initially uploading the firmware and configuration script from the HTTP server, then the environment variable '__FWVERSION' is set with the value '8 .30 ' at this time. The command LoadScript\ $__SERIALNO-$__FWVERSION.lcs does not find a suitable configuration script at this time. The device then executes the command LoadFirmware LCOS.upx and after rebooting, the environment variable '__FWVERSION' is set to the value '8.50 '. The command LoadScript\ $__SERIALNO-$__FWVERSION.lcs then finds a suitable script to update the configuration.
Anmerkung: In the cron command Loadscript\ $__SERIALNO-$__FWVERSION.lcs, the space between the load script command and the environment variables is protected with a backslash. Trying to use the alternative notation of enclosing the entire command in quotation marks will result in an error. LCOS treats environment variables in quotation marks as normal text, so the any variables would be ignored.