- Tutorials:
The object provides an interface to the update manager (handles software updates subsystem operations).
Update Manager allows you to initiate and display the status of the software upgrade procedure.
Before any software update operation you must stop every single process of media content accessing and displaying.
Update manager is a finite state machine. State is accessible via stbUpdate.getStatus
method. Initial state "Idle" (value "21").
Any active operation upon the update system is only allowed in one of final states (for example "Idle"). Right after
starting of an operation state machine should be considered as busy until any of final states is settled back.
Methods
(static) GetFlashBankCount() → {number}
Return total number of banks available for update.
Returns:
if everything is fine at least one bank should be available [0..n]
- Type
- number
(static) getActiveBank() → {number}
Return memory bank number, that has been used for current software boot.
Returns:
possible values:
Value | Description |
---|---|
0 | first memory bank |
1 | second memory bank |
-1 | memory bank is undefined (it could be possible if device was booted from network storage, e.g. NFS) |
- Type
- number
(static) getImageDateStr() → {string}
Return timestamp of "Update Image" file that has been read during last successful "Check" operation.
Example
'Thu Nov 3 15:07:57 EET 2011'
Returns:
timestamp expressed in image-specific format
- Type
- string
(static) getImageDescStr() → {string}
Return description of "Update Image" file that has been read during last successful "Check" operation.
Example
'0.2.12-250-alpha'
Returns:
description
- Type
- string
(static) getImageVersionStr() → {string}
Return version of "Update Image" file that has been read during last successful "Check" operation.
Example
'211'
Returns:
version
- Type
- string
(static) getPercents() → {number}
Return a progress indicator value for pending update operation.
Returns:
value expressed in percents [0..100]
- Type
- number
(static) getStatus() → {number}
Return the last available status code for an update operation.
Returns:
possible values:
Value | Description |
---|---|
-1 | Not defined |
1 | Signature init error (final state error) |
2 | Wrong device model |
3 | Section size exceeds partition size on FLASH |
4 | Required FLASH section not found. Aborting update |
5 | Updating kernel |
6 | Updating image |
7 | Internal error (final state error) |
8 | Inspecting firmware |
9 | Updating environment variables |
10 | Updating Bootstrap section |
11 | Skipping Bootstrap section |
12 | Updating User FS section |
13 | Skipping User FS section |
14 | Updating second boot |
15 | Updating logotype |
16 | Update finished OK (final state OK) |
17 | Wrong signature (final state OK) |
18 | Erasing flash section |
19 | Flash write error (final state error) |
20 | File write error (final state error) |
21 | Idle (final state OK) |
22 | Invalid file header (final state error) |
23 | Inspecting update file |
23 | File check finished |
24 | File check finished (final state OK) |
25 | File not found (final state error) |
26 | Initialising |
27 | Read error (final state error) |
- Type
- number
(static) getStatusStr() → {string}
Return the last available status for an update operation.
Returns:
status description string
localization will be done according to settings of internal portal
- Type
- string
(static) startAutoUpdate(imageUrl, checkVersion)
Start an automatic software update procedure.
Dedicated web window will be opened using URL "imageUrl
".
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
imageUrl |
string | "Update Image" file address, can be in following forms:
|
||||||
checkVersion |
boolean | possible values:
|
(static) setAutoUpdateInitAttr(windowAttributes)
- See:
Set URL for "Auto Update" web window.
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
windowAttributes |
stbWindowMgr~windowAttributes | initialization parameters to set Properties
|
(static) startCheck(imageUrl)
Start a metadata inspection for "Update Image" file.
Parameters:
Name | Type | Description |
---|---|---|
imageUrl |
string | file address which will be inspected for available metadata, can be in following forms:
|
(static) startUpdate(bankIndex, imageUrl)
Start a software update using "Update Image" file.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
bankIndex |
number | possible values:
|
||||||
imageUrl |
string | "Update Image" file address, can be in following forms:
|