Skip to content

Over-The-Air (OTA) firmware update

Overview

The firmware update process (OTA) is managed by the SDK via the IEvsOtaService interface (received from the Evs.instance().ota() method).

The SDK embed the glasses firmware update files, and it detects when an updated is available.

The SDK implements by default a UI for managing both the update available notification and the update process.

The SDK enables developers to override the default firmware update UI and to implement their own UI.

The firmware data is uploaded to the glasses via Bluetooth, so it is recommended to perform firmware update having 1 meter or less between the phone and the glasses and to disconnect any other Bluetooth devices from the phone.

Note

The Firmware update process should be handled carefully

Battery Level

It is recommended to perform firmware update when the glasses battery is above 50%

  • The update will fail if the glasses are under 20% battery
  • The update will fail if the glasses are under 50% battery and not connected to the charger

The Update Process

The update process has the following steps:

  1. Check
    • Upon connection, an update check is performed
    • If update exist the SDK Will notify the app about the available update
  2. Approve
    • The app\user will approve the SDK to start the update process
  3. Upload
    • The SDK will upload the firmware information to the glasses
  4. Install
    • The SDK will instruct the glasses to install the update
  5. Reboot & Reconnect
    • The glasses will reboot, The SDK will reconnect the glasses

Overriding the OTA stock UI

In order to override the default OTA stock UI (currently only portrait is supported), your application should override the following callbacks:

Swift
Evs.instance().ota().overrideOtaAvailableHandler(handler: otaAvailableHandler)
Evs.instance().ota().overrideOtaProcessHandler(handler: otaProcessHandler)
Kotlin
Evs.instance().ota().overrideOtaAvailableHandler(otaAvailableHandler)
Evs.instance().ota().overrideOtaProcessHandler(otaProcessHandler)

OTA Simulation

Since the firmware update is a sensitive process, it is not recommended to test the process with actual firmware install

In order to test the UI and the application flow the SDK supplies an option to simulate the OTA process without the need to perform actual firmware update

The simulation can be activated via the developer add-on as follows:

Swift
if let developerService = Evs.instance().getAddOn(addOnName: AddonNamesKt.EVS_ADDON_DEVELOPER) as? IEvsDeveloperService {
    developerService.startOtaSimulationEnvironment(otaAvailableHandler: otaAvailableHandler, otaProcessHandler: otaProcessHandler)
    developerService.startOtaSim(simResult: .none)
}
Kotlin
val developerService = Evs.instance().getAddOn(EVS_ADDON_DEVELOPER) as IEvsDeveloperService? ?: return

developerService.startOtaSimulationEnvironment(otaAvailableHandler,otaProcessHandler)
developerService.startOtaSim(null)

  • Learn how to create a better UI for the glasses by reading our UI Kit