startUpdate

open suspend override fun startUpdate(release: FirmwareRelease, hardware: DeviceHardware, address: String, updateState: (FirmwareUpdateState) -> Unit, firmwareUri: CommonUri? = null): FirmwareArtifact?(source)

Begin a firmware update for the connected device.

Return

A FirmwareArtifact that should be cleaned up by the caller, or null if the update was not started.

Parameters

release

The firmware release to install.

hardware

The target device's hardware descriptor.

address

The bare device address (MAC, IP, or serial path) with the transport prefix stripped.

updateState

Callback invoked as the update progresses through FirmwareUpdateState stages.

firmwareUri

Optional pre-selected firmware file URI (for "update from file" flows).