Closed maximevince closed 2 years ago
Oh, and defining these config options will work around the issue (the looping bug is still there, obviously):
CONFIG_MCUMGR_GRP_ZEPHYR_BASIC=y
CONFIG_MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE=y
Oh, and defining these config options will work around the issue (the looping bug is still there, obviously):
CONFIG_MCUMGR_GRP_ZEPHYR_BASIC=y CONFIG_MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE=y
Will look into the bug. The options you are mentioning here are required for NRF53 because the app tries to erase storage area, while doing the update. Nevertheless if they are not enabled, the mcumgr should respond with 'not-supported' error code instead of breaking.
Oh, and defining these config options will work around the issue (the looping bug is still there, obviously):
CONFIG_MCUMGR_GRP_ZEPHYR_BASIC=y CONFIG_MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE=y
Will look into the bug. The options you are mentioning here are required for NRF53 because the app tries to erase storage area, while doing the update. Nevertheless if they are not enabled, the mcumgr should respond with 'not-supported' error code instead of breaking.
okay, good to know. Isn't there a way to make sure these options are enabled by default on the nRF53 targets?
That is not default for nrf53 targets, because that was needed by some sample apps only This is probably connected to https://github.com/zephyrproject-rtos/zephyr/issues/43858
@maximevince Does the issue persist with current Zephyr revision?
The issue with the loop has been fixed with https://github.com/zephyrproject-rtos/zephyr/pull/43868, closing. @maximevince Please re-open if you do not agree.
Describe the bug mcumgr goes into an endless loop, looking for mgmt_group with id 63.
To Reproduce Steps to reproduce the behavior:
cd zephyr/samples/subsys/mgmt/mcumgr/smp_svr
west build --board=nrf5340dk_nrf5340_cpuapp_ns -p always -- -DOVERLAY_CONFIG=overlay-bt.conf
build/zephyr/app_update.bin
)west attach
, andbt
in gdb.Expected behavior Expected is that the board reboots into MCUboot and applies the firmware upgrade / image swap.
Impact FOTA not working using nRF connect app. When using
mcumgr
from the PC, it works. It seems that nRF Connect app issues a custom zephyr command (mgmt_group 63), whichmcumgr
does not. That custom command is not available on the default sample build, and theAnalysis I suspect there's an issue in
mgmt_find_group
, which keeps looping though the circular linked listmgmt_group_list
. It's looking for(command_id=0, group_id=63)
, but never finds it. Instead of breaking out of the loop, it keeps going round and round.Logs and console output gdb backtrace:
Environment (please complete the following information):