Tapkey provides functionality for upgrading the firmware of Tapkey-enabled locks. The process roughly consists of following steps:
- Query the lock's state by using the
CommandExecutionFacade.queryPublicStateAsyncfunction. The returned data structure contains information required to query information about available firmware from the server.
- Query information about firmware packages available for installation from the server. Use the
/api/v1/FirmwaresGET operation provided by the Tapkey Trust Service. The required parameters
compatibleFromVersioncan be taken from the public state from the previous step.
- Optionally present the available firmware versions to the user and let the user select the package to install.
- Use the
FirmwareManager.downloadFirmwareContentAsyncfunction to download the encrypted firmware package for the respective lock.
- Upload and install the package to the lock using the
CommandExecutionFacade.upgradeFirmwarefunction. If starting from scratch, provide
firstChunkIdxargument. When resuming an upload, provide the last value returned by the
The user installing the firmware upgrade package must have an unlock permission for the upgrade process to succeed.