Closed ptienchuan closed 10 months ago
Hello, The protocol for updating devices using McuManager over SMP protocol is using the following commands:
You may also choose a "mode" of the DFU: Test & Confirm, Test Only, Confirm Only or Upload Only. In all of them the Reset command is sent, which should reset the device. In Test & Confirm mode, after the device resets the library will reconnect to it and send Confirm command. There won't be another Reset command sent after that. Other 3 modes finish after sending Reset.
@philips77 Thanks for your response. Could you tell me how to choose "mode" ?
Hi @ptienchuan,
You can set FirmwareUpgradeConfiguration
in the update
method in UpdateManager.
final updateManager = await _updateManagerFactory
.getUpdateManager(request.peripheral!.identifier);
updateManager.setup();
updateManager.update(
request.firmwareImages!,
configuration: FirmwareUpgradeConfiguration(
// firmwareUpgradeMode: FirmwareUpgradeMode.confirmOnly,
// firmwareUpgradeMode: FirmwareUpgradeMode.testAndConfirm,
// firmwareUpgradeMode: FirmwareUpgradeMode.testOnly,
// firmwareUpgradeMode: FirmwareUpgradeMode.uploadOnly,
),
);
Hi development team,
I have no idea how to soft reset the device after transferring image done when using this package. Please tell me:
Env: