how to add softsim to an existing project like nrf_cloud_multi_service

Hi,

We recently managed to get the onomondo softsim working on a dev kit, we used the sample code provided by onomodo to do this. Now we want to add the softsim to the nrf_cloud_multi_service sample. What are the changes that we need to make on this sample inorder for it to work with a softsim. 

  • I'm getting this kconfig error error: Aborting due to Kconfig warnings


    CMake Error at C:/ncs/v2.6.2/zephyr/cmake/modules/kconfig.cmake:358 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v2.6.2/nrf/cmake/modules/kconfig.cmake:29 (include)
      C:/ncs/v2.6.2/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
      C:/ncs/v2.6.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.6.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:9 (find_package) 

    while trying to build using west build -b nrf9151dk_nrf9151_ns -- "-DOVERLAY_CONFIG=C:\ncs\v2.6.2\modules\lib\onomondo-softsim/overlay-softsim.conf" 
  • The sample build successfully when I made this changes in the prj.conf 

    #
    # Copyright (c) 2022 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # Log level
    # For more verbose and detailed log output, set the log level to
    # CONFIG_MULTI_SERVICE_LOG_LEVEL_DBG=y instead.
    CONFIG_MULTI_SERVICE_LOG_LEVEL_INF=y
    
    # General config
    CONFIG_EVENTS=y
    CONFIG_PICOLIBC_IO_FLOAT=y
    CONFIG_RESET_ON_FATAL_ERROR=y
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    # LED indication
    # Uncomment these to minimize LED state indication when power savings are necessary
    # CONFIG_LED_VERBOSE_INDICATION=n
    # CONFIG_LED_CONTINUOUS_INDICATION=n
    
    # Or, uncomment this to completely disable LED state indication
    # CONFIG_LED_INDICATION_DISABLED=y
    
    # Improved Logging
    # CONFIG_LOG_MODE_DEFERRED allows logging from multiple threads simultaneously without creating
    # splintered log entries, at the cost of needing a buffer for storing logs.
    CONFIG_LOG_MODE_DEFERRED=y
    
    # CONFIG_LOG_BUFFER_SIZE is the aforementioned buffer. A size of 4096 bytes is useful for debugging
    # and prototyping, but is probably more than necessary for production-ready firmware.
    CONFIG_LOG_BUFFER_SIZE=4096
    
    # Heap and stacks
    # Extended AT host/monitor stack/heap sizes since some nrf_cloud credentials are longer than 1024 bytes.
    CONFIG_AT_MONITOR_HEAP_SIZE=2048
    CONFIG_AT_HOST_STACK_SIZE=2048
    # Extended memory heap size needed both for PGPS and for encoding JSON-based nRF Cloud Device Messages.
    CONFIG_HEAP_MEM_POOL_SIZE=54576
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    
    # Enable Networking and Connection Manager.
    CONFIG_NETWORKING=y
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_OFFLOAD=y
    CONFIG_NET_MGMT_EVENT_STACK_SIZE=2048
    CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=1024
    CONFIG_MAIN_STACK_SIZE=2048
    
    # Enable LTE Connectivity using Connection Manager
    CONFIG_NET_IPV4=y
    CONFIG_NET_IPV6=y
    CONFIG_NET_IPV6_NBR_CACHE=n
    CONFIG_NET_IPV6_MLD=n
    CONFIG_NET_CONNECTION_MANAGER=y
    CONFIG_NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC=y
    CONFIG_NRF_MODEM_LIB_NET_IF=y
    CONFIG_NRF_MODEM_LIB_NET_IF_AUTO_DOWN=y
    CONFIG_NRF_MODEM_LIB_NET_IF_DOWN_DEFAULT_LTE_DISCONNECT=y
    
    # Enable power savings mode
    CONFIG_LTE_PSM_REQ=y
    # Set the PSM Requested Active Time to 20 seconds
    CONFIG_LTE_PSM_REQ_RAT="00001010"
    
    # Modem library
    CONFIG_NRF_MODEM_LIB=y
    
    # AT commands interface
    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_AT_HOST_LIBRARY=y
    
    # nRF Cloud
    CONFIG_NRF_CLOUD_MQTT=y # This also enables FOTA by implicitly setting CONFIG_NRF_CLOUD_FOTA=y
    
    # MQTT
    CONFIG_MQTT_KEEPALIVE=120
    
    # MCUBOOT - Needed by FOTA
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_IMG_MANAGER=y
    CONFIG_MCUBOOT_IMG_MANAGER=y
    CONFIG_STREAM_FLASH_ERASE=y
    
    # Location Services configuration
    CONFIG_LOCATION=y
    CONFIG_LOCATION_METHOD_GNSS=y
    CONFIG_LOCATION_METHOD_CELLULAR=y
    CONFIG_NRF_CLOUD_AGNSS=y
    CONFIG_NRF_CLOUD_LOCATION=y
    CONFIG_MODEM_INFO=y
    CONFIG_MODEM_INFO_ADD_NETWORK=y
    CONFIG_NRF_CLOUD_PGPS=y
    CONFIG_NRF_CLOUD_PGPS_REPLACEMENT_THRESHOLD=4
    CONFIG_NRF_CLOUD_PGPS_REQUEST_UPON_INIT=y
    
    # Date Time lib - Used by PGPS and main application
    CONFIG_DATE_TIME=y
    
    # LTE link control - used by PGPS and main application
    CONFIG_LTE_LINK_CONTROL=y
    
    # Settings - used by nRF Cloud library and PGPS
    CONFIG_SETTINGS=y
    CONFIG_SETTINGS_FCB=y
    CONFIG_FCB=y
    
    # Download Client - used by FOTA and PGPS
    CONFIG_DOWNLOAD_CLIENT=y
    CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_1024=y
    CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
    CONFIG_DOWNLOAD_CLIENT_BUF_SIZE=2300
    CONFIG_DOWNLOAD_CLIENT_MAX_HOSTNAME_SIZE=128
    
    # Flash - Used by FOTA and PGPS
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_STREAM_FLASH=y
    CONFIG_MPU_ALLOW_FLASH_WRITE=y
    CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n
    CONFIG_NRF_CLOUD_ALERT=y
    CONFIG_NRF_CLOUD_LOG_DIRECT=y
    CONFIG_NRF_CLOUD_LOG_OUTPUT_LEVEL=3
    
    # On initial connection to the cloud, add info sections to the shadow
    CONFIG_NRF_CLOUD_SEND_DEVICE_STATUS=y
    CONFIG_NRF_CLOUD_SEND_DEVICE_STATUS_NETWORK=y
    CONFIG_NRF_CLOUD_SEND_DEVICE_STATUS_SIM=y
    CONFIG_NRF_CLOUD_SEND_SERVICE_INFO_FOTA=y
    CONFIG_NRF_CLOUD_SEND_SERVICE_INFO_UI=y
    
    CONFIG_NRF_CLOUD_CLIENT_ID_SRC_IMEI=y
    CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX="nrf-"
    # CONFIG_NRF_CLOUD_IPV6=y # disable this for US
    CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y # use LTE-M for US
    
    CONFIG_FP_SOFTABI=y
    
    CONFIG_SOFTSIM=y
    CONFIG_SOFTSIM_AUTO_INIT=y
    
    # NVS Configurations
    CONFIG_NVS=y
    CONFIG_NVS_LOG_LEVEL_ERR=y
    CONFIG_PM_PARTITION_SIZE_NVS_STORAGE=0x8000
    
    CONFIG_SOFTSIM_BUNDLE_TEMPLATE_HEX=y
    
    # Reduce the size of TF-M by disabling the PS
    CONFIG_TFM_PARTITION_PROTECTED_STORAGE=n
    CONFIG_PSA_CRYPTO_DRIVER_CC3XX=n
    
    # Reduce the size of the TF-M partition
    # when combined with static partitioning
    CONFIG_PM_PARTITION_SIZE_TFM=0x10000
    
    # The bootloader adds a small mcuboot_pad partition,
    # whose size must be subtracted from the TF-M partition
    #CONFIG_BOOTLOADER_MCUBOOT=y
    # CONFIG_PM_PARTITION_SIZE_TFM=0xfe00
    
    # Flash Configurations
    # CONFIG_FLASH=y
    # CONFIG_FLASH_MAP=y
    # CONFIG_FLASH_PAGE_LAYOUT=y
    # CONFIG_MPU_ALLOW_FLASH_WRITE=y
    
    # TF-M Configurations
    # CONFIG_BUILD_WITH_TFM=y
    # CONFIG_TFM_PROFILE_TYPE_NOT_SET=y
    # CONFIG_TFM_LOG_LEVEL_SILENCE=y
    
    # # PSA Crypto Configurations
    # CONFIG_PSA_WANT_ALG_CBC_NO_PADDING=y
    # CONFIG_PSA_WANT_ALG_ECB_NO_PADDING=y
    # CONFIG_PSA_WANT_ALG_CMAC=y
    # CONFIG_PSA_WANT_KEY_TYPE_AES=y
    
    # # Libraries
    # CONFIG_NEWLIB_LIBC=y

    And then I flashed this firmware onto a device in which a soft sim was already provisioned and this is what I see in the terminal. 

    The program doesn't go beyond this point as the device can't register with the network.

    When I ran the AT command to check the network registration status, I'm getting +CEREG: 5,2 as response.

    PS: The sdk version I'm using 2.6.2

  • Hi,

    Can you specify only the changes which you made to the prj.conf?

    Updating only Kconfig options in prj.conf might not be enough to integrate Onomondo SoftSim with the multi service sample. Additional steps might be needed. I will check this internally and get back to you during next week.

    Best regards,
    Dejan

  • Hi Dejan,

    Can you specify only the changes which you made to the prj.conf?

    CONFIG_FP_SOFTABI=y
    
    CONFIG_SOFTSIM=y
    CONFIG_SOFTSIM_AUTO_INIT=y
    
    # NVS Configurations
    CONFIG_NVS=y
    CONFIG_NVS_LOG_LEVEL_ERR=y
    CONFIG_PM_PARTITION_SIZE_NVS_STORAGE=0x8000
    
    CONFIG_SOFTSIM_BUNDLE_TEMPLATE_HEX=y
    
    # Reduce the size of TF-M by disabling the PS
    CONFIG_TFM_PARTITION_PROTECTED_STORAGE=n
    CONFIG_PSA_CRYPTO_DRIVER_CC3XX=n
    
    # Reduce the size of the TF-M partition
    # when combined with static partitioning
    CONFIG_PM_PARTITION_SIZE_TFM=0x10000
    
    # The bootloader adds a small mcuboot_pad partition,
    # whose size must be subtracted from the TF-M partition
    #CONFIG_BOOTLOADER_MCUBOOT=y
    # CONFIG_PM_PARTITION_SIZE_TFM=0xfe00
    
    # Flash Configurations
    # CONFIG_FLASH=y
    # CONFIG_FLASH_MAP=y
    # CONFIG_FLASH_PAGE_LAYOUT=y
    # CONFIG_MPU_ALLOW_FLASH_WRITE=y
    
    # TF-M Configurations
    # CONFIG_BUILD_WITH_TFM=y
    # CONFIG_TFM_PROFILE_TYPE_NOT_SET=y
    # CONFIG_TFM_LOG_LEVEL_SILENCE=y
    
    # # PSA Crypto Configurations
    # CONFIG_PSA_WANT_ALG_CBC_NO_PADDING=y
    # CONFIG_PSA_WANT_ALG_ECB_NO_PADDING=y
    # CONFIG_PSA_WANT_ALG_CMAC=y
    # CONFIG_PSA_WANT_KEY_TYPE_AES=y
    
    # # Libraries
    # CONFIG_NEWLIB_LIBC=y
    .

    here you go.

    Updating only Kconfig options in prj.conf might not be enough to integrate Onomondo SoftSim with the multi service sample. Additional steps might be needed. I will check this internally and get back to you during next week.

    Ok, I'll wait.

    best regards,

  • Hi Dejan,

    Any update on this?

    best regards,

Related