ISU – Firmware Update¶
The backend used to find and download updates is located at update.wifiradiofrontier.com.
To interact with the underlaying API, the isudata-module comes with three main-methods:
url_get_update
,find_update
andget_update
.
- class fsapi.isu.update.ISUSoftwareElement(customisation: str | None = None, version: str | None = None, download_url: str | None = None, mandatory: bool = False, md5hash: str | None = None, product: str | None = None, size: int = 0, vendor: str = 'Frontier Silicon', summary: str | None = None)¶
This class contains all information needed to distinguish an update entry.
Use the
loadxml
function to import data from an XML-Element.- Parameters:
customisaton – The customisation string for this element.
version – The version string for this element.
download_url – The URL where the firmware binary is located
mandatory – Indicates whether this update is mandatory
md5hash – The calculated md5Hash for the firmware binary
product – The product’s name
vendor – usually Frontier Silicon
size – the file’s size
- loadxml(element: Element)¶
Imports data from the given XML-Element.
- fsapi.isu.update.url_get_update(name: str) str ¶
An URL generator for the given product descriptor.
- Parameters:
name – the customisation and version put toghether wither with a ‘_V’.
- Returns:
the newly generated url where the firmware can be downloaded
- fsapi.isu.update.get_update(path: str, url: str = None, software: ISUSoftwareElement = None, netconfig: FSNetConfiguration = None)¶
Tries to download and save the firmware binary located at the given URL.
- Parameters:
path – an absolute or relative path to the output file
url – optional the direct download link - if not set, the software parameter must be defined
software – the software object containing the relevant data for downloading the update file
netconfig – if a custom configuration like a proxy should be used, this object can be passed as a parameter
- fsapi.isu.update.find_update(mac: str, customisation: str, version: str, netconfig: FSNetConfiguration = None) UpdateRequest ¶
Tries to find updates for the given version and customisation.
- Parameters:
mac – The MAC-Address string of a frontier silicon device in the following format:
002261xxxxxx
. This string must start with002261
.customisation – Information about the used interface, module and version number.
version – As the name already states, the full version string.
netconfig – if a custom configuration like a proxy should be used, this object can be passed as a parameter
- Returns:
a new instance of an
UpdateRequest
that stores any occurred errors.