Skip to content

Firmware Upgrade

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.queryPublicStateAsync function. 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/Firmwares GET operation provided by the Tapkey Trust Service. The required parameters manufacturerId, fwType and compatibleFromVersion can 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.upgradeFirmware function. If starting from scratch, provide 0 as firstChunkIdx argument. When resuming an upload, provide the last value returned by the progress callback's getNofChunksCompleted() parameter.

Note

The user installing the firmware upgrade package must have an unlock permission for the upgrade process to succeed.