Firmware update
Firmware update
Here is detailed information about the firmware update process using Klas.
DBus is used to communicate with the system and manage the firmware update process, a detailed description of the API is available in the DBus API documentation.
- New firmware version
Kamea will notify Klas about some new firmware version available for the device. The informations are relayed by the agent using thenewFirmwareVersionsAvailableDbus signal. - Accept / Refuse new version
To confirm or refuse the new firmware version, the system can use Klas Dbus methodsacceptFirmware().
The update stops here if the system does not accept the new firmware version. - New firmware file available
Once the firmware file is downloaded, Klas will notify the system about the new firmware file location using thenewFirmwareFilesAvailableDbus signal. - Confirm installation status
To report the installation status to Kamea, the system can use theconfirmFirmwareInstall()Dbus method. If the installation is successful, the status will be set toInstalled. Otherwise, the status can will be set toInstallationFailedsuffixed with the provided errorCode.
Klas will keep Kamea informed about the update status.
This status is available as a reported configuration named firmwaretype_update_state on Kamea and can have the following values:
- Informed
Klas has emitted thenewFirmwareVersionsAvailablesignal to the system and does not require an immediate response from the system, it will wait untilacceptFirmware()is called. - Refused
The user has refused the new firmware version, Klas will update the reported configuration status toRefusedsuffixed with the provided errorCode value and stop the update process. The system will not be notified about the firmware update until a new firmware version is available. - Downloading
The user has accepted the new firmware version, Klas will update the reported configuration status toDownloadingand start the download process. - Installing
Klas has emitted thenewFirmwareFilesAvailablesignal to the system and is waiting for the user to confirm the installation status with theconfirmFirmwareInstall()method. - Install failed
The user did not confirm the installation status, Klas will update the reported configuration status toInstallFailedsuffixed with the provided errorCode value. - Installed
The user has confirmed the installation status, Klas will update the reported configuration status toInstalled.