OtaControl

object OtaControl

Firmware-update control opcodes for GattUuids.FIRMWARE_UPDATE_SERVICE (vendor OTA contract, ported from the C SDK's ota_update.hpp).

The host writes REQUEST / DONE to the control characteristic; the device answers with the corresponding ACK/NAK code as a notification on the status characteristic. Firmware bytes travel as plain (MTU - 3)-byte writes to the packet characteristic between the two control writes. There is no CRC or resume: integrity rests on the ATT write-with-response acks, and an interrupted transfer leaves the previous firmware in place.

Properties

Link copied to clipboard
const val DONE: Byte = 4
Link copied to clipboard
const val DONE_ACK: Byte = 5
Link copied to clipboard
const val DONE_NAK: Byte = 6
Link copied to clipboard
const val NOP: Byte = 0
Link copied to clipboard
const val REQUEST: Byte = 1
Link copied to clipboard
const val REQUEST_ACK: Byte = 2
Link copied to clipboard
const val REQUEST_NAK: Byte = 3