Get info about banks available for update:
// return total number of banks
console.log(stbUpdate.GetFlashBankCount());
// return memory bank number, that has been used for current software boot
console.log(stbUpdate.getActiveBank());
Start a metadata inspection for Update Image
file:
var uri = 'http://test.com/imageupdate',
pathFolder = '/media/usbdisk/mag200/imageupdate';
stbUpdate.startCheck(uri);
stbUpdate.startCheck(pathFolder);
Check operation status code:
if ( stbUpdate.getStatus() !== 21 ) {
console.log('Operation has failed! See status codes description.');
}
Get information about Update Image
file (in case status is successful):
// return timestamp of "Update Image"
console.log(stbUpdate.getImageDateStr());
// return description of "Update Image" file
console.log(stbUpdate.getImageDescStr());
// return version of "Update Image" file
console.log(stbUpdate.getImageVersionStr());
Different methods to update:
// start a software update using "Update Image" file
stbUpdate.startUpdate(inactiveBank, uri);
stbUpdate.startUpdate(inactiveBank, pathFolder);
// start an automatic software update procedure
stbUpdate.startAutoUpdate(uri, true);
stbUpdate.startAutoUpdate(pathFolder, true);
Get update status:
// return the last available status code for an update operation
console.log(stbUpdate.getStatus());
// return a progress indicator value for pending update operation
console.log(stbUpdate.getPercents());
// return the last available status for an update operation
console.log(stbUpdate.getStatusStr());