Skip to content

Last updated: 2026-11-10

The SDK updates the firmware on both sides of the glasses. It handles the transfer to each side, flow control and the version check after the glasses reconnect. This page uses the Flutter API. For Kotlin and Swift, see Native Android and iOS.

Start an update ​

Listen to events first. After the whole device is ready, pass the complete G2 EVENOTA firmware file for that G2 model as bytes, with the target version from the release:

dart
final operationId = await sdk.startOta(
  firmware: firmwareBytes, // Uint8List
  targetVersion: targetVersionFromRelease,
);

The returned ID means the SDK accepted the update. The transfer and the version check after reconnecting follow as separate phases.

When the native SDK refuses the request, startOta throws a PlatformException with the code notReady, busy, invalidFirmware or invalidTargetVersion.

Cancel an update ​

dart
await sdk.cancelOta(operationId: operationId);

This cancels the operation startOta returned, including while the glasses reconnect.

Follow the update ​

ota events report the update. Match them to it by sn, operation and the connection generation.

  • progress: the fraction of the firmware transferred, from 0 to 1.
  • phase == 'transportCompleted': the transfer to both sides finished.
  • phase == 'succeeded': after the glasses reconnect, the SDK read the version on both sides and it matches your target. leftVersion and rightVersion carry the versions read back.
  • failure: why the update failed.

Show the update as installed only after succeeded. If a version does not match or cannot be read back, the installation is not verified.