Skip navigation

Autoupdate module description

Autoupdate module is for organization of firmware version automatic and handle updating via HTTP from URL.

By default autoupdate module works from manufacturer URL if the variable autoupdateURL is not specified!!!

Example of the variable:
autoupdateURL=http://example.com/update_list.txt

autoupdateURL - URL which should contain update_list.txt file

Stages of the update process

  1. Verification environment variable autoupdate_cond, status «0» - autoupdate option, «1» - update with confirmation, «2» - autoupdate is disabled. If the variable is «0» or «1» than the necessity of update initialized.
  2. File reading which contain the list of all available updates which are sorted by date from old to new (the last/new record in the end).
  3. Date comparing from the new/last record with image making date which is specified by stb.RDir(«ImageDate») function and returns environment variable Image_Date. In case if image-making date is newest - autoupdate isn't initialized.
  4. If the date in file update list is newest than the date of image-making date in STB than - additive date checking initialized according to the image-making date according to the URL which is pointed in the update text file.
  5. If the additive update shows that update date is newest than current - checking of image type initialized. Autoupdate to alpha version isn't initialized. Autoupdate to beta version initialized in case if the option in “Settings” is enabled. This option set the environment variable «betaupdate_cond». Status «1» - «update», «0» - «don't update». By default the satus is set to «don't update».
  6. If the version «release» or «beta» and set option «update on beta versions» & the date is newest then image making date of current, then autoupdate is initialized.

Syntax of update_list.txt file , example:

[
{"name":"0.2.14-r3", "url":"http://example.com/250/imageupdate214r3", "type":"release", "date":"26 Nov 2012 23:22:19 GMT+0200", "descr":"Release"},
{"name":"0.2.14-r7", "url":"http://example.com/250/imageupdate214r7", "type":"release", "date":"30 Nov 2012 14:43:29 GMT+0200", "descr":"Release"}
]

where:

  • name - name;
  • url - url of firmware version;
  • type - type of release;
  • date - time and date of image, timezone in GMT;
  • descr - description;

Disabling of Autoupdate module and control elements in user interface

services.html

/home/web/services.html

<tr>
    <td class="t20w pad10r tabs_center_title" id="autoUpdateHolder" align="right"></td>
    <td class="t18w" id="autoUpdateInputHolder"></td>
</tr>
<tr>
    <td class="t20w pad10r tabs_center_title" id="alphaUpdateHolder" align="right"></td>
    <td class="t18w" id="alphaUpdateInputHolder"></td>
</tr>

Should be:

<tr style="display:none;">
    <td class="t20w pad10r tabs_center_title" id="autoUpdateHolder" align="right"></td>
    <td class="t18w" id="autoUpdateInputHolder"></td>
</tr>
<tr style="display:none;">
    <td class="t20w pad10r tabs_center_title" id="alphaUpdateHolder" align="right"></td>
    <td class="t18w" id="alphaUpdateInputHolder"></td>
</tr>

vars.js

/home/web/vars.js

settings_objArr = new RegExp("MAG200").test(gSTB.GetDeviceModelExt())?
[
 [
  ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"],
  ["ssdelay_select"],["videoClockSel"],["autoupdateSel"],["alphaupdateSel"],
  ["update_button","update_button_s"]
 ]
]:
[
 [
  ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"],
  ["ssdelay_select"],["videoClockSel"],["autoupdateSel"],["alphaupdateSel"],
  ["timeShiftSettings"],["update_button","update_button_s"]
 ],
 [
  ["tsOn"],["tsIco"],["tsPath"],["tsTime"],["tsEndType"],["tsExitType"],["tsLag"],["tsBack"]
 ]
],

Should be: remove - autoupdateSel , alphaupdateSel , update_button

settings_objArr = new RegExp("MAG200").test(gSTB.GetDeviceModelExt())?
[
 [
  ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"],
  ["ssdelay_select"],["videoClockSel"],["update_button_s"]
 ]
]:
[
 [
  ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"],
  ["ssdelay_select"],["videoClockSel"],["timeShiftSettings"],["update_button_s"]
 ],
 [
  ["tsOn"],["tsIco"],["tsPath"],["tsTime"],["tsEndType"],["tsExitType"],["tsLag"],["tsBack"]
 ]
],

Set the variables

Making the image in env.txt Example env.txt :

autoupdate_cond=2
betaupdate_cond=0
Need Help

Dave is an expert on the MAG STB and the author of this article.

Was this article helpful?

Yes No

Sorry to hear that.
How can we improve this article?

We use cookies in order to optimise our website, provide you with the best possible user experience and help us promote our products. Please read our Cookie Policy to find out how we use cookies and how you can control cookies.
By using this website or closing this message, you acknowledge our Privacy Policy and agree to our use of cookies as described in our Cookie Policy.