Nrf9160 as MCUmgr client build error

Hi,
I'm using nRF9160 as an MCUmgr SMP client to download firmware via HTTPS and send it to nRF52840 (SMP server). Using SDK version NCS v2.9.1, I enabled CONFIG_NRF_MCUMGR_SMP_CLIENT=y and plan to use this on nrf91:

  • mcumgr_smp_client_download_start() to download + send
  • mcumgr_smp_client_update() to trigger update

But I get build errors like:

zephyr/mgmt/mcumgr/grp/img_mgmt/img_mgmt.h:14:10: fatal error: bootutil/image.h: No such file or directory

Here is my parts of prj.conf relate to it:

CONFIG_NCS_SAMPLES_DEFAULTS=y
# MCUboot bootloader and DFU support
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_BOOTUTIL_LIB=y
CONFIG_BOOT_BANNER=n
CONFIG_IMG_MANAGER=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y
CONFIG_MCUBOOT_IMG_MANAGER=y
CONFIG_STREAM_FLASH=y
CONFIG_REBOOT=y

# FOTA and DFU support
CONFIG_DFU_TARGET=y
CONFIG_FOTA_DOWNLOAD=y
CONFIG_ZCBOR=y

# MCUmgr
CONFIG_MCUMGR=y
# CONFIG_NRF_MCUMGR_SMP_CLIENT=y # TODO
CONFIG_DFU_TARGET_SMP=y

# Enable MCUboot support
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_BOOTUTIL_LIB=y

# Enable partition manager
CONFIG_PARTITION_MANAGER_ENABLED=y

# TLS security tags
CONFIG_MQTT_TLS_SEC_TAG=24
CONFIG_HTTPS_SEC_TAG=42
CONFIG_WPM_FOTA_HTTPS_SEC_TAG=42

# App image version
CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="1.0.0"

# Enable logging
CONFIG_MCUBOOT_UTIL_LOG_LEVEL_WRN=y
CONFIG_TFM_LOG_LEVEL_SILENCE=y


Did I miss anything?

I appreciate any help on this!

Parents
  • Hello Hậu, 

    I would suggest to take a look at the lwm2m_client sample and nrf_cloud_rest_fota sample to see how it's done there. 
    I think what you are missing is 

    CONFIG_MCUMGR_GRP_IMG=y
    CONFIG_MCUMGR_GRP_OS=y
    CONFIG_MCUMGR_TRANSPORT_UART=y
     
    But maybe more needed, please take a look at the prj.conf in these files. 
  • Hi Hùng,

    Thank you for your suggestion and apologies for my delayed response. I reviewed the example you recommended, but it doesn’t seem to provide the specific information I need about MCU management (or perhaps I’m still not fully understanding it). The lwm2m_client example appears to focus on the LwM2M carrier client functionality, and the nrf_cloud_rest_fota example seems to handle self-updates rather than peer device updates using MCU Manager.

    I’ve been trying to reproduce the issue using the blinky example, but despite multiple attempts, I’m unable to build it successfully. I’ve attached the blinky example in a zip file. If you have some time, could you please take a look and try building the project I sent? I’d greatly appreciate your help.4544.blinky.zip

    Thank you in advance!

  • Hi,

    Probably CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y is missing from the prj.conf

    Best regards,
    Juha

Reply Children
No Data
Related