DfuUploadTransport
Common upload-time surface implemented by both SecureDfuTransport (Nordic Secure DFU, service FE59) and LegacyDfuTransport (Nordic Legacy DFU / Adafruit BLEDfu, service 1530).
The choice of which implementation to use is made by the handler after the device reboots into bootloader mode, based on which DFU service is exposed.
Inheritors
Functions
Link copied to clipboard
Establish the GATT session with the device in DFU mode.
Link copied to clipboard
abstract suspend fun transferFirmware(firmware: ByteArray, onProgress: suspend (Float) -> Unit): Result<Unit>
Upload the firmware binary (.bin). onProgress is invoked with a value in [0.0, 1.0] after each protocol checkpoint (PRN window or end-of-image).
Link copied to clipboard
Upload the init packet (.dat) and have the device validate it.