nrf_cloud_multi_service sample runs in to fatal error while trying to request A-GNSS data

The nrf_cloud_multi_service sampe is running in to fatal error while trying to downolad A-GNSS data. The sample is configured to work with NB-IoT and CoAP.

Here is the log.

+CSCON: 1
[02:12:35.539,520] <inf> shadow_support_coap: Shadow delta received
[02:12:35.539,520] <inf> shadow_support_coap: Checking shadow again in 300 seconds
+CSCON: 0
[02:16:13.004,943] <inf> location: Cellular method specific timeout expired
%NCELLMEAS: 1
[02:16:13.015,716] <wrn> location: Current cell ID not valid
[02:16:13.015,747] <wrn> location: Requesting A-GNSS data without location assistance
[02:16:13.015,777] <err> os: ***** SECURE FAULT *****
[02:16:13.015,808] <err> os:   Address: 0x8
[02:16:13.015,808] <err> os:   Attribution unit violation
[02:16:13.015,838] <err> os: r0/a1:  0x20022ea8  r1/a2:  0x00000000  r2/a3:  0x20022f08
[02:16:13.015,838] <err> os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x0003516b
[02:16:13.015,869] <err> os:  xpsr:  0x61000000
[02:16:13.015,899] <err> os: s[ 0]:  0x20025064  s[ 1]:  0x00000000  s[ 2]:  0x00000001  s[ 3]:  0x0003e91b
[02:16:13.015,930] <err> os: s[ 4]:  0x00000002  s[ 5]:  0x20025060  s[ 6]:  0x00000002  s[ 7]:  0x000292a9
[02:16:13.015,930] <err> os: s[ 8]:  0x00000010  s[ 9]:  0x00000000  s[10]:  0x20016898  s[11]:  0x0003a9b9
[02:16:13.015,960] <err> os: s[12]:  0x0000002a  s[13]:  0x00000020  s[14]:  0x0003e179  s[15]:  0x20016cd4
[02:16:13.015,991] <err> os: fpscr:  0x00000000
[02:16:13.015,991] <err> os: Faulting instruction address (r15/pc): 0x0003516c
[02:16:13.016,021] <err> os: >>> ZEPHYR FATAL ERROR 41: Unknown error on CPU 0
[02:16:13.016,052] <err> os: Current thread: 0x2000f648 (unknown)
*** Booting MCUboot v2.1.0-dev-daf2946a0f07 *** system
*** Using nRF Connect SDK v2.7.0-5cb85570ca43 ***
*** Using Zephyr OS v3.6.99-100befc70c74 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
*** Booting nRF Connect SDK v2.7.0-5cb85570ca43 ***
*** Using Zephyr OS v3.6.99-100befc70c74 ***
[00:00:00.251,586] <inf> main: nRF Cloud multi-service sample has started, version: 1.0.0, protocol: CoAP
[00:00:00.251,770] <inf> cloud_connection: Enabling connectivity...
[00:00:00.530,548] <inf> cloud_connection: Setting up nRF Cloud library...
[00:00:00.532,348] <inf> cloud_connection: Waiting for network ready...
+CGEV: EXCE STATUS 0
+CEREG: 2,"C014","0000C090",9
+CSCON: 1

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=19000
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_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=60

# 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_NBIOT_GPS=y # use LTE-M for US
# CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
CONFIG_AT_CMD_REQUESTS=n

CONFIG_TFM_SECURE_UART=n
CONFIG_TFM_LOG_LEVEL_SILENCE=y
CONFIG_UART_USE_RUNTIME_CONFIGURE=y

# CONFIG_LOCATION_TRACKING_SAMPLE_INTERVAL_SECONDS=360

# CONFIG_UART_ASYNC_API=y
# CONFIG_LOCATION_REQUEST_DEFAULT_TIMEOUT=6000
# CONFIG_LOCATION_DATA_DETAILS=y
CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=y
# CONFIG_SENSOR_SAMPLE_INTERVAL_SECONDS=300
CONFIG_GNSS_FIX_TIMEOUT_SECONDS=80

CONFIG_LED_INDICATION_PWM=n
CONFIG_LED_INDICATION_GPIO=n
CONFIG_LED_INDICATION_DISABLED=y

CONFIG_NRFX_SAADC=y
# CONFIG_LOCATION_TRACKING=n

overlay_coap.conf

#
# Copyright (c) 2022 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# General config
CONFIG_FPU=y
CONFIG_NEWLIB_LIBC_NANO=n

# Rate of cloud interactions
# These are faster than one normally would use in a low power device.
# This is strictly for demo purposes.
CONFIG_SENSOR_SAMPLE_INTERVAL_SECONDS=1920
CONFIG_LOCATION_TRACKING_SAMPLE_INTERVAL_SECONDS=360
CONFIG_COAP_FOTA_JOB_CHECK_RATE_MINUTES=5

# Logs
CONFIG_LOG=y
CONFIG_NET_LOG=y
CONFIG_LOG_PRINTK=y
CONFIG_COAP_LOG_LEVEL_INF=y
CONFIG_LOCATION_LOG_LEVEL_INF=y
CONFIG_NRF_CLOUD_COAP_LOG_LEVEL_INF=y
CONFIG_MULTI_SERVICE_LOG_LEVEL_INF=y

# LTE link control - used by PGPS and main application
CONFIG_LTE_LINK_CONTROL=y
#CONFIG_NET_L2_VIRTUAL=y

# Modem
CONFIG_MODEM_KEY_MGMT=y
CONFIG_MODEM_JWT=y
CONFIG_MODEM_INFO_ADD_DEVICE=y
CONFIG_MODEM_INFO_ADD_DATE_TIME=n
CONFIG_MODEM_INFO_ADD_SIM=n
CONFIG_MODEM_INFO_ADD_SIM_ICCID=n
CONFIG_MODEM_INFO_ADD_SIM_IMSI=n

# Network
CONFIG_POSIX_API=y
CONFIG_NET_SOCKETS_TLS_SET_MAX_FRAGMENT_LENGTH=y
CONFIG_NET_SOCKETS_OFFLOAD_PRIORITY=40

# CoAP Client
CONFIG_COAP_CLIENT_BLOCK_SIZE=1024
CONFIG_COAP_CLIENT_STACK_SIZE=6144
CONFIG_COAP_CLIENT_THREAD_PRIORITY=0
CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=64

# Not compatible with ground-fix
CONFIG_ZCBOR_CANONICAL=n

# nRF Cloud
CONFIG_NRF_CLOUD_MQTT=n
CONFIG_NRF_CLOUD_COAP=y
CONFIG_NRF_CLOUD_ALERT=y
CONFIG_NRF_CLOUD_LOG_DIRECT=y
CONFIG_NRF_CLOUD_LOG_OUTPUT_LEVEL=3
CONFIG_NRF_CLOUD_LOG_LOG_LEVEL_INF=y
CONFIG_NRF_CLOUD_FOTA_POLL=y

# Disable MQTT-specific services; equivalent CoAP versions are used instead.
CONFIG_NRF_CLOUD_FOTA=n
CONFIG_NRF_CLOUD_LOCATION=n

# Location Services configuration
CONFIG_LOCATION_DATA_DETAILS=y

CONFIG_APPLICATION_THREAD_STACK_SIZE=4096
CONFIG_TEMP_ALERT_LIMIT=24

regards,

Parents
  • Hello, 

    Could you please elaborate what changes you have made to the Multi service sample, if any? Is this the same project as in   softsim integration into a existing project without disabling FOTA. ?

    Please run arm-none-eabi-addr2line -e zephyr.elf 0x0003c5d1 to get the failing address. zephyr.elf is found under build\zephyr\

    Kind regards,
    Øyvind

  • Hi,

    the error is happening at 0x0003516c.

    coap_codec_ground_fix_resp_decode
    C:/ncs/v2.7.0/nrf/subsys/net/lib/nrf_cloud/coap/src/coap_codec.c:377

    Could you please elaborate what changes you have made to the Multi service sample, if any? Is this the same project as in   softsim integration into a existing project without disabling FOTA. ?

    No, this one doesn't have the softsim enabled and the sdk version of this project is 2.7.0, the other one uses 2.6.2.

    Changes I made on this project:

    1. Enabled uart1 and SAADC on channel 0.

    2. Enabled two gpio outputs, one is connected to nrf52832 for waking it up from system off sleep, the other on is connected to the COEX pin of nrf9151. both of them are pulled up.

    3. removed these source/header files:

    • at_command.c
    • at_command.h
    • provisioning_support.c
    • provisioning_support.h
    • temperature.c
    • temperature.h
    • led_control.c
    • led_control.h

    4. Added these files:

    • serial_app_layer.c // uart init and application layer code
    • serial_app_layer.h
    • hardware.c // adc init, gpio init etc
    • harfware.h

    5. Added few custom shadow configurations.

     warm regards,

Reply
  • Hi,

    the error is happening at 0x0003516c.

    coap_codec_ground_fix_resp_decode
    C:/ncs/v2.7.0/nrf/subsys/net/lib/nrf_cloud/coap/src/coap_codec.c:377

    Could you please elaborate what changes you have made to the Multi service sample, if any? Is this the same project as in   softsim integration into a existing project without disabling FOTA. ?

    No, this one doesn't have the softsim enabled and the sdk version of this project is 2.7.0, the other one uses 2.6.2.

    Changes I made on this project:

    1. Enabled uart1 and SAADC on channel 0.

    2. Enabled two gpio outputs, one is connected to nrf52832 for waking it up from system off sleep, the other on is connected to the COEX pin of nrf9151. both of them are pulled up.

    3. removed these source/header files:

    • at_command.c
    • at_command.h
    • provisioning_support.c
    • provisioning_support.h
    • temperature.c
    • temperature.h
    • led_control.c
    • led_control.h

    4. Added these files:

    • serial_app_layer.c // uart init and application layer code
    • serial_app_layer.h
    • hardware.c // adc init, gpio init etc
    • harfware.h

    5. Added few custom shadow configurations.

     warm regards,

Children
No Data
Related