UnifiedOtaProtocol

Interface for ESP32 Unified OTA protocol implementation. Supports both BLE and WiFi/TCP transports.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun close()

Close the connection and cleanup resources.

Link copied to clipboard
abstract suspend fun connect(): Result<Unit>

Connect to the device and discover OTA service/establish connection.

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

Start OTA update process.

Link copied to clipboard
abstract suspend fun streamFirmware(data: ByteArray, chunkSize: Int, onProgress: suspend (Float) -> Unit): Result<Unit>

Stream firmware binary data to the device.