LegacyDfuException

Errors specific to the Nordic Legacy DFU protocol. These are a subtype of DfuException so the existing handler error-path code (which catches DfuException) covers both protocols.

Inheritors

Types

Link copied to clipboard

Init packet (dat) appears to be Secure-DFU shaped (signed/CBOR), not the small legacy 14-32 B form.

Link copied to clipboard
class MidStreamDisconnect(val bytesSent: Int, val totalBytes: Int, val connectionState: BleConnectionState, val lastConfirmedBytes: Int, cause: Throwable? = null) : LegacyDfuException

The BLE link dropped while firmware bytes were in flight. Carries the host in-flight offset (the end of the write the host had dispatched or was in flight at the moment of the drop) so the retry coordinator can distinguish a mid-stream failure (which switches subsequent Legacy uploads to LegacyDfuStreamProfile.RECOVERY) from a handshake/connect failure (which does not).

Link copied to clipboard

Bytes received reported by device differs from bytes sent past last PRN window.

Link copied to clipboard
class ProtocolError(val requestOpcode: Byte, val status: Byte) : LegacyDfuException

Device returned a non-success status for a given opcode.

Link copied to clipboard

START_DFU was rejected with INVALID_STATE because the bootloader still holds state from an interrupted session. The current connection is closed without attempting RESET; SecureDfuHandler performs a bounded reset-prime over a fresh connection before retrying.

Link copied to clipboard

Bootloader exposes DFU Version characteristic with a value below 5 (Nordic SDK ≤ 6). Unsupported.

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
expect open val message: String?