ImageManagerKtx
A manager of the Image group of Mcu Manager, with suspending methods and flows. It wraps ImageManager.
Every suspending method waits until the response is received, and throws a McuMgrException if the request fails, or a McuMgrErrorException if the device responds with an error, that is with a non-zero return code. Cancelling the calling coroutine stops waiting for the response, but does not cancel the request, which has already been sent.
The upload and the download are long-running, and report their state using a Flow. See TransferState. To update the firmware of a device, with all the steps it takes, use no.nordicsemi.android.mcumgr.ktx.dfu.FirmwareUpgradeManagerKtx.
Use the manager to set a logger, the upload MTU, etc.
Properties
Functions
Confirms the image with the given hash, or the running image, so that it is run after every reset.
Downloads the core dump.
Erases the core dump.
Reads the core list.
Reads a chunk of the core dump.
Erases the image in the secondary slot, or in the given slot.
Reads the state of the images on the device.
Reads the slots of the images on the device.
Requests the image with the given hash to be tested, that is run once, on the next reset.
Sends a single packet of the image, starting from the given offset.