apache/mynewt-mcumgr

Device bricked when firmware in Slot 1 got somehow Permanent flag

Closed this issue · 6 comments

Hi,

Our devices are getting randomly bricked by updating firmware through mcumgr in Zephyr. It happens on both the nRF91 and nRF52 chips when we run the latest nRF Connect SDK 1.3. The reason is that firmware in Slot 1 is sometimes set Permanent flag, but we don't know how and why. When this happens, it cannot be erased/confirmed/reflashed/anything else. Any ideas what could be the cause and how to fix it?

screen_1
screen_2
screen_3

@lukasbrchl I think it should be rather reported here https://github.com/zephyrproject-rtos/mcumgr .
Are you using the command line mcumgr tool or the iOS/Android UI?

@lukasbrchl please open a support ticket in the Nordic DevZone in order for us to be able to follow-up, since this is an nRF Connect SDK issue. We will be able to diagnose the problem there.

https://devzone.nordicsemi.com

utzig commented

Might be related with mcu-tools/mcuboot#762

Hi guys, thank you for your reply. The mcumgr Zephyr repo has disabled issues, but we reported it on DevZone. However, we have somehow figured the issue ourselves. Please see my latest comment here - https://devzone.nordicsemi.com/f/nordic-q-a/65641/mcumgr---device-bricked-when-firmware-in-slot-1-got-somehow-permanent-flag

So one minor correction, this is not about the certificates rather than mcumgr uploading faulty images. The JuulLabs-OSS/mcuboot#762 is probably relevant and we will try to solve it.

Hi @lukasbrchl, I tested my PR #97 just now and found the latest mcumgr code only had an issue with the image erase command not image upload with the particular parial slot-1 erase issue we had.

I've opened another PR #98 to close this remaining issue. Note in this PR that the error code I got was 6 not 2. What checkout SHA of the mcumgr library where you using?