NordicSemiconductor / Flutter-nRF-Connect-Device-Manager

A Flutter plugin for McuMgr libraries for Android and iOS.
BSD 3-Clause "New" or "Revised" License
36 stars 17 forks source link

Issue with reset not rebooting the device #87

Open IvRogoz opened 6 months ago

IvRogoz commented 6 months ago

I am trying out the Flutter DFU example app. I can Upload and it restarts the device but it never boots up, and even sending it restart over CLI does not wake it.

I can upload the new firmware via nrf connect app. It goes through but does not update (needs reboot which nrf connect app for some reason does not do). I then go to Device Manager App and can test and confirm the firmware that was uploaded by nrf connect. It is swapped and works after pressing reset command button.

If I try with Flutter test DFU app it also uploads and returns all Ok, It starts to reboot the process but it does not boot.

This is the output while using Flutter DFU.

[00:01:30.684,967] <inf> mcuboot_util: Image index: 0, Swap type: none
[00:01:30.685,760] <inf> mcuboot_util: Image index: 1, Swap type: none
[00:01:30.686,340] <err> mcumgr_img_grp: Failed to open flash area ID 1: -2
[00:01:31.360,595] <inf> mcuboot_util: Image index: 0, Swap type: none
[00:02:01.581,115] <inf> mcuboot_util: Image index: 1, Swap type: none
[00:02:16.386,352] <err> mcumgr_img_grp: Failed to open flash area ID 1: -2
[00:02:16.387,237] <inf> mcuboot_util: Image index: 1, Swap type: none
[00:02:16.388,763] <inf> mcuboot_util: Image index: 0, Swap type: none
[00:02:16.389,892] <inf> mcuboot_util: Image index: 1, Swap type: perm
[00:02:16.390,411] <err> mcumgr_img_grp: Failed to open flash area ID 1: -2
[00:02:16.431,549] <inf> mcuboot_util: Image index: 0, Swap type: none
[00:02:16.432,922] <inf> mcuboot_util: Image index: 0, Swap type: perm
[00:02:16.434,082] <inf> mcuboot_util: Image index: 1, Swap type: perm
[00:02:16.434,600] <err> mcumgr_img_grp: Failed to open flash area ID 1: -2

Serial Port closed

I tried to add TestAndConfirm option but then it Resets the device and waits for it to boot (which it does not) and finally Update failed.

Only flashing another firmware over SWD brings it back. Its a custom board.