Modem Shell - nRF915dk build for cloud_coap throws error “undefined boot_write_img_confirmed” with nRF Connect SDK 3.2.1

Hello,

modem_shell sample build throws error “undefined boot_write_img_confirmed” with nRF Connect SDK 3.2.1. This issue didn't exist in nRF Connect SDK 3.1.0.

I did a quick workaround but would like to know why there was a Kconfig change and if the proposed fix is the best option. If not, please recommend the correct solution.


Environment:

  • nrf9151dk with modem firmware v2.0.4

With NCS 3.2.1

  • Used the latest “Modem Shell” sample from NCS 3.2.1
  • Modified it to use MCUBoot and Ext Flash
  • Built “Modem Shell”  with cloud_coap

Build error

  • Get error in main.c, “undefined boot_write_img_confirmed”

…
…
#if (defined(CONFIG_BOOTLOADER_MCUBOOT) && !defined(CONFIG_LWM2M_CARRIER))
    boot_write_img_confirmed();
#endif


Workaround

  • set “#define CONFIG_LWM2M_CARRIER = 1"

Previously with NCS 3.1.0

  • The modem_shell sample had CONFIG_LWM2M_CARRIER already enabled
  • Hence, in main.c “boot_write_img_confirmed()” was disabled correctly and build didn’t generate any error.
  • model_shell has been connecting to nRF Cloud successfully ever since NCS 3.1.0 came out.
  • Modified modem_shell uses MCUBoot and the external FLASH of the nrf9151dk
  • Built modem shell with cloud_coap (nrf9151dk/nrf9151/ns)
  • Flashed modem shell to nrf9151dk successfully.
  • nrf9151dk connects to cellular network fine
  • nRF Cloud connection works fine as well


Set  CONFIG_LWM2M_CARRIER as above, built Modem Shell as nrf9151dk/nrf9151/ns target

  • nrf9151dk connects to cellular network and nRF Cloud
  • Verified connectivity to nRF Cloud via “location get —method=cellular"

mosh:~$ cloud connect
Modem domain event: CE-level 0
RRC mode: Connected
[00:00:34.130,096] <inf> nrf_cloud_info: Device ID:  <UUID>
[00:00:34.139,312] <inf> nrf_cloud_info: IMEI:      <IMEI>
[00:00:34.231,689] <inf> nrf_cloud_info: UUID:       <UUID>
[00:00:34.237,731] <inf> nrf_cloud_info: Modem FW:  mfw_nrf91x1_2.0.4
[00:00:34.237,762] <inf> nrf_cloud_info: Protocol:          CoAP
[00:00:34.237,792] <inf> nrf_cloud_info: Download protocol: HTTPS
[00:00:34.237,792] <inf> nrf_cloud_info: Sec tag:           16842753
[00:00:34.237,823] <inf> nrf_cloud_info: CoAP JWT Sec tag:  16842753
[00:00:34.237,854] <inf> nrf_cloud_info: Host name:         coap.nrfcloud.com
[00:00:37.015,869] <inf> nrf_cloud_coap_transport: Request authorization with JWT
[00:00:37.275,848] <inf> nrf_cloud_coap_transport: Authorization result_code: 2.01
[00:00:37.275,970] <inf> nrf_cloud_coap_transport: Authorized
[00:00:37.276,184] <inf> nrf_cloud_coap_transport: DTLS CID is active
RRC mode: Idle

Is there any reason as to why CONFIG_LWM2M_CARRIER is no longer set in NCS 3.2.1?

What is the recommnded fix for setting the CONFIG_LWM2M_CARRIER?

Thank you.


Parents
  • Hello,

    I did not manage to reproduce the error here. Below is a picture of the build configurations I used. Do you see anything that is different from your configuration? I also see that the CONFIG_LWM2M_CARRIER symbols gets selected if you include the "overlay-carrier.conf" and it looks like it was the same in SDK v3.1.0. 

    Best regards,

    Vidar

  • Hi Vidar,

    Thanks. It's interesting that you included "overlay-app_fota.conf".

    When I don't include "overlay-app_fota.conf" with the "overlay-cloud_coap.conf", I get the "“undefined boot_write_img_confirmed”" error in main.c.

    It appears that with "overlay-app_fota.conf", CONFIG_LWM2M_CARRIER doesn't get selected. Previously in NCS 3.1.0, this didn't happen.

     

    Best Regards,
    Ravi

Reply
  • Hi Vidar,

    Thanks. It's interesting that you included "overlay-app_fota.conf".

    When I don't include "overlay-app_fota.conf" with the "overlay-cloud_coap.conf", I get the "“undefined boot_write_img_confirmed”" error in main.c.

    It appears that with "overlay-app_fota.conf", CONFIG_LWM2M_CARRIER doesn't get selected. Previously in NCS 3.1.0, this didn't happen.

     

    Best Regards,
    Ravi

Children
Related