startOta

abstract suspend fun startOta(sizeBytes: Long, sha256Hash: String, onHandshakeStatus: suspend (OtaHandshakeStatus) -> Unit = {}): Result<Unit>(source)

Start OTA update process.

Return

Success if device accepts and is ready, error otherwise

Parameters

sizeBytes

Total firmware size in bytes

sha256Hash

SHA-256 hash of the firmware (64 hex characters)

onHandshakeStatus

Optional callback to report status changes (e.g., "Erasing...")