Problem with the application asset_tracker_v2

I'm working with nRF9160-DK and the nRF Connect SDK V2.1.0.

When i try to evaluate the application asset_tracker_v2 it dont' download the AGPS from the nRF Cloud.

But the application GNSS (from samples/nrf9160) work fine and download the AGPS information.

What is the problem with the asset_tracker_v2?

Thanks and best regards.

  • Hello,

    can you show the prj.conf and logging output from both the asset_tracker_v2 and GNSS sample?

  • *** Booting Zephyr OS build v3.1.99-ncs1  ***
    Attempting to boot slot 0.
    Attempting to boot from address 0x8200.
    Verifying signature against key 0.
    Hash: 0x37...04
    Firmware signature verified.
    Firmware version 1
    *** Booting Zephyr OS build v3.1.99-ncs1  ***
    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: Swap type: none
    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: Swap type: none
    I: Bootloader chainload address offset: 0x28000
    *** Booting Zephyr OS build v3.1.99-ncs1  ***
    [00:00:00.494,384] <inf> app_event_manager: APP_EVT_START
    [00:00:00.495,086] <dbg> cloud_module: state_set: State: STATE_LTE_INIT
    [00:00:00.495,086] <dbg> cloud_module: sub_state_set: Sub state: SUB_STATE_CLOUD_DISCONNECTED
    [00:00:00.495,239] <dbg> data_module: state_set: State: STATE_CLOUD_DISCONNECTED
    [00:00:00.495,697] <dbg> data_module: config_settings_handler: Device configuration loaded from flash
    [00:00:00.495,849] <dbg> data_module: config_print_all: Device mode: Active
    [00:00:00.495,849] <dbg> data_module: config_print_all: Active wait timeout: 120
    [00:00:00.495,880] <dbg> data_module: config_print_all: Movement resolution: 120
    [00:00:00.495,910] <dbg> data_module: config_print_all: Movement timeout: 3600
    [00:00:00.495,910] <dbg> data_module: config_print_all: GPS timeout: 60
    [00:00:00.495,941] <dbg> data_module: config_print_all: Accelerometer act threshold: 10.00
    [00:00:00.495,971] <dbg> data_module: config_print_all: Accelerometer inact threshold: 5.00
    [00:00:00.496,002] <dbg> data_module: config_print_all: Accelerometer inact timeout: 60.00
    [00:00:00.496,002] <dbg> data_module: config_print_all: Requesting of neighbor cell data is enabled
    [00:00:00.496,032] <dbg> data_module: config_print_all: Requesting of GNSS data is enabled
    [00:00:00.496,124] <inf> app_event_manager: DATA_EVT_CONFIG_INIT
    [00:00:00.496,795] <inf> app_event_manager: MODEM_EVT_INITIALIZED
    %CESQ: 55,2,4,0
    +CEREG: 0
    %CESQ: 59,2,10,1
    +CEREG: 2,"0888","01407A78",7
    [00:00:00.633,331] <dbg> cloud_module: state_set: State transition STATE_LTE_INIT --> STATE_LTE_DISCONNECTED
    [00:00:00.693,389] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTING
    [00:00:00.830,322] <inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
    [00:00:01.572,509] <inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
    +CSCON: 1
    +CGEV: ME PDN ACT 0,0
    +CNEC_ESM: 50,0
    %MDMEV: SEARCH STATUS 2
    +CEREG: 1,"0888","01407A78",7,,,"00001010","11000010"
    %XTIME: "80","22906261911280","01"
    %CESQ: 62,3,15,2
    [00:00:06.045,043] <wrn> modem_module: Event: PDP context 0, PDN type IPv4 only allowed
    [00:00:06.053,680] <inf> app_event_manager: MODEM_EVT_LTE_CONNECTED
    [00:00:06.054,321] <inf> app_event_manager: MODEM_EVT_LTE_PSM_UPDATE
    [00:00:06.055,725] <dbg> cloud_module: state_set: State transition STATE_LTE_DISCONNECTED --> STATE_LTE_CONNECTED
    [00:00:06.055,755] <dbg> cloud_module: connect_cloud: Connecting to cloud
    [00:00:06.055,786] <wrn> cloud_module: Cloud connection establishment in progress
    [00:00:06.055,786] <wrn> cloud_module: New connection attempt in 32 seconds if not successful
    [00:00:06.055,908] <dbg> cloud_module: cloud_wrap_event_handler: CLOUD_WRAP_EVT_CONNECTING
    [00:00:06.055,969] <inf> app_event_manager: CLOUD_EVT_CONNECTING
    [00:00:06.079,315] <inf> app_event_manager: DATA_EVT_DATE_TIME_OBTAINED
    [00:00:09.855,041] <dbg> cloud_module: cloud_wrap_event_handler: CLOUD_WRAP_EVT_DATA_RECEIVED
    [00:00:09.856,689] <dbg> cloud_module: cloud_wrap_event_handler: Device configuration encoded
    [00:00:09.856,781] <inf> app_event_manager: CLOUD_EVT_CONFIG_RECEIVED
    [00:00:09.862,915] <dbg> data_module: new_config_handle: No new values in incoming device configuration update message
    [00:00:09.862,915] <dbg> data_module: new_config_handle: Acknowledge currently applied configuration back to cloud
    [00:00:09.865,417] <inf> app_event_manager: DATA_EVT_CONFIG_SEND
    [00:00:09.866,119] <dbg> cloud_module: qos_event_handler: QOS_EVT_MESSAGE_NEW
    [00:00:09.866,210] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    [00:00:10.589,324] <dbg> cloud_module: cloud_wrap_event_handler: CLOUD_WRAP_EVT_DATA_ACK: 15000
    [00:00:10.589,355] <dbg> cloud_module: qos_event_handler: QOS_EVT_MESSAGE_REMOVED_FROM_LIST
    [00:00:10.589,355] <dbg> cloud_module: qos_event_handler: Freeing pointer: 0x2001b278
    %NCELLMEAS: 0,"01407A78","21403","0888",2,6200,267,62,17,4059,10350
    [00:00:11.246,795] <dbg> cloud_module: cloud_wrap_event_handler: CLOUD_WRAP_EVT_CONNECTED
    [00:00:11.246,887] <inf> app_event_manager: CLOUD_EVT_CONNECTED
    [00:00:11.248,199] <inf> app_event_manager: APP_EVT_DATA_GET - Requested data types (MOD_DYN, BAT, ENV, MOD_STAT, NEIGHBOR_CELLS)
    [00:00:11.248,870] <dbg> cloud_module: sub_state_set: Sub state transition SUB_STATE_CLOUD_DISCONNECTED --> SUB_STATE_CLOUD_CONNECTED
    [00:00:11.249,755] <inf> app_event_manager: SENSOR_EVT_ENVIRONMENTAL_NOT_SUPPORTED
    [00:00:11.326,660] <dbg> data_module: agps_request_handle: A-GPS request sent
    [00:00:11.326,690] <dbg> data_module: state_set: State transition STATE_CLOUD_DISCONNECTED --> STATE_CLOUD_CONNECTED
    [00:00:11.327,148] <inf> app_event_manager: MODEM_EVT_MODEM_STATIC_DATA_READY
    [00:00:11.364,166] <inf> app_event_manager: MODEM_EVT_MODEM_DYNAMIC_DATA_READY
    [00:00:11.401,092] <inf> app_event_manager: MODEM_EVT_BATTERY_DATA_READY
    [00:00:11.409,820] <inf> app_event_manager: MODEM_EVT_NEIGHBOR_CELLS_DATA_READY
    [00:00:11.507,659] <inf> app_event_manager: DATA_EVT_DATA_READY
    [00:00:11.510,833] <dbg> data_module: data_encode: Neighbor cell data encoded successfully
    [00:00:11.510,894] <inf> app_event_manager: DATA_EVT_NEIGHBOR_CELLS_DATA_SEND
    [00:00:11.511,932] <dbg> data_module: data_encode: Regular data updates are not supported
    [00:00:11.521,606] <dbg> data_module: data_encode: Batch data encoded successfully
    [00:00:11.521,667] <inf> app_event_manager: DATA_EVT_DATA_SEND_BATCH
    [00:00:11.522,430] <dbg> cloud_module: qos_event_handler: QOS_EVT_MESSAGE_NEW
    [00:00:11.522,491] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    [00:00:11.522,644] <dbg> cloud_module: qos_event_handler: QOS_EVT_MESSAGE_REMOVED_FROM_LIST
    [00:00:11.522,644] <dbg> cloud_module: qos_event_handler: Freeing pointer: 0x2001aea0
    [00:00:11.522,766] <dbg> cloud_module: qos_event_handler: QOS_EVT_MESSAGE_NEW
    [00:00:11.522,857] <inf> app_event_manager: CLOUD_EVT_DATA_SEND_QOS
    [00:00:12.180,419] <dbg> cloud_module: cloud_wrap_event_handler: CLOUD_WRAP_EVT_DATA_ACK: 15002
    [00:00:12.180,450] <dbg> cloud_module: qos_event_handler: QOS_EVT_MESSAGE_REMOVED_FROM_LIST
    [00:00:12.180,480] <dbg> cloud_module: qos_event_handler: Freeing pointer: 0x2001b6c0
    +CSCON: 0
    %CESQ: 60,3,10,1
    
    #
    # Copyright (c) 2021 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # General config
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    CONFIG_ASSERT=y
    CONFIG_REBOOT=y
    CONFIG_FPU=y
    
    # Heap and stacks
    CONFIG_HEAP_MEM_POOL_SIZE=47250
    CONFIG_MAIN_STACK_SIZE=1408
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    CONFIG_HW_STACK_PROTECTION=y
    # Increase AT monitor heap size to be able to fit both neighbor cell measurement
    # and other AT notifications that may come in rapid succession.
    CONFIG_AT_MONITOR_HEAP_SIZE=1024
    
    # Logging
    CONFIG_LOG=y
    CONFIG_LOG_MODE_DEFERRED=y
    
    # nRF modem library
    CONFIG_NRF_MODEM_LIB=y
    
    # AT Host library - Used to send AT commands directy from an UART terminal and to allow
    #		    integration with nRF Connect for Desktop LTE Link monitor application.
    CONFIG_AT_HOST_LIBRARY=y
    
    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_NATIVE=n
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_OFFLOAD=y
    CONFIG_NET_IPV6=y
    CONFIG_NET_IPV4=y
    
    # LTE link control
    CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
    CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
    ## Power saving timers.
    ### 320 hours PSM.
    CONFIG_LTE_PSM_REQ_RPTAU="11000001"
    ### 20 seconds active time.
    CONFIG_LTE_PSM_REQ_RAT="00001010"
    
    # Settings - Used to store real-time device configuration to flash.
    CONFIG_SETTINGS=y
    CONFIG_SETTINGS_FCB=y
    CONFIG_FCB=y
    
    # FOTA
    CONFIG_FOTA_DOWNLOAD=y
    CONFIG_DFU_TARGET=y
    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 in FOTA, settings and storage for P-GPS.
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_STREAM_FLASH=y
    CONFIG_MPU_ALLOW_FLASH_WRITE=y
    
    # MCUBOOT
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_IMG_MANAGER=y
    CONFIG_MCUBOOT_IMG_MANAGER=y
    CONFIG_IMG_ERASE_PROGRESSIVELY=y
    CONFIG_SECURE_BOOT=y
    CONFIG_BUILD_S1_VARIANT=y
    
    # Watchdog
    CONFIG_WATCHDOG_APPLICATION=y
    
    # Application Event Manager
    CONFIG_APP_EVENT_MANAGER=y
    CONFIG_APP_EVENT_MANAGER_LOG_EVENT_TYPE=n
    
    # cJSON - Used in cloud data encoding.
    CONFIG_CJSON_LIB=y
    
    # CAF - Common Application Framework
    CONFIG_CAF=y
    CONFIG_LED=y
    CONFIG_CAF_LEDS=y
    CONFIG_CAF_INIT_LOG_LED_READY_EVENTS=n
    CONFIG_CAF_INIT_LOG_LED_EVENTS=n
    CONFIG_CAF_INIT_LOG_MODULE_STATE_EVENTS=n
    
    # Default cloud transport service
    CONFIG_NRF_CLOUD_MQTT=y
    
    *** Booting Zephyr OS build v3.1.99-ncs1  ***
    [00:00:00.634,185] <inf> gnss_sample: Starting GNSS sample
    [00:00:00.654,296] <inf> gnss_sample: Connecting to LTE network
    +CEREG: 0
    +CEREG: 2,"0888","01407A78",7
    +CSCON: 1
    +CEREG: 1,"0888","01407A78",7,,,"00100011","00101001"
    [00:0+CEDRXP: 4,"1001","1001","0001"
    0:03.054,931] <inf> gnss_sample: Connected to LTE network
    [00:00:03.064,422] <inf> gnss_sample: Waiting for current time
    %XTIME: "80","22906261133280","01"
    [00:00:03.097,717] <inf> gnss_sample: Assistance data needed, ephe 0xffffffff, alm 0xffffffff, flags 0x3b
    [00:00:03.199,401] <inf> gnss_sample: Requesting A-GPS data, ephe 0xffffffff, alm 0xffffffff, flags 0x3b
    [00:00:08.571,228] <inf> gnss_sample: Processing A-GPS data
    [00:00:08.737,487] <inf> gnss_sample: A-GPS data processed
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 6
    Searching [|]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 7
    Searching [/]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 8
    Searching [-]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 9
    Searching [\]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 10
    Searching [|]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 11
    Searching [/]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 12
    Searching [-]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 13
    Searching [\]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 14
    Searching [|]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 15
    Searching [/]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 16
    Searching [-]
    
    NMEA strings:
    Tracking:  0 Using:  0 Unhealthy: 0
    GNSS operation blocked by LTE
    -----------------------------------
    Seconds since last fix: 17
    Searching [\]
    
    NMEA strings:
    
    +CSCON: 0
    Tracking:  0 Using:  0 Unhealthy: 0
    -----------------------------------
    Seconds since last fix: 18
    Searching [|]
    
    NMEA strings:
    
    $GPGGA,163121.58,,,,,0,,99.99,,M,,M,,*6D
    $GPGLL,,,,,163121.58,V,N*41
    $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*2D
    $GPGSV,3,1,12,2,11,249,,5,64,256,,7,17,056,,8,00,036,,1*61
    $GPGSV,3,2,12,11,00,201,,13,61,317,,14,51,109,,15,31,300,,1*69
    $GPGSV,3,3,12,18,11,310,,20,43,188,,24,03,245,,30,49,052,,1*67
    $GPRMC,163121.58,V,,,,,,,260922,,,N,V*01
    Tracking:  7 Using:  0 Unhealthy: 0
    -----------------------------------
    Seconds since last fix: 19
    Searching [/]
    
    NMEA strings:
    
    $GPGGA,163122.58,,,,,0,,99.99,,M,,M,,*6E
    $GPGLL,,,,,163122.58,V,N*42
    $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*2D
    $GPGSV,3,1,12,2,11,249,,5,64,256,30,7,17,056,38,8,00,036,,1*69
    $GPGSV,3,2,12,11,00,201,,13,61,317,30,14,51,109,42,15,31,300,28,1*66
    $GPGSV,3,3,12,18,11,310,,20,43,188,30,24,03,246,,30,49,052,40,1*63
    $GPRMC,163122.58,V,,,,,,,260922,,,N,V*02
    Tracking:  8 Using:  3 Unhealthy: 1
    -----------------------------------
    Seconds since last fix: 20
    Searching [-]
    
    NMEA strings:
    
    $GPGGA,163123.58,,,,,0,03,99.99,,M,,M,,*6C
    $GPGLL,,,,,163123.58,V,N*43
    $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99,1*2D
    $GPGSV,4,1,13,2,11,249,,5,64,255,30,7,17,056,39,8,00,036,,1*6D
    $GPGSV,4,2,13,11,00,201,,13,62,318,28,14,51,109,43,15,31,300,27,1*6B
    $GPGSV,4,3,13,18,11,310,,20,43,188,34,24,03,246,,28,,,45,1*57
    $GPGSV,4,4,13,30,49,052,40,1*5B
    $GPRMC,163123.58,V,,,,,,,260922,,,N,V*03
    Tracking:  9 Using:  6 Unhealthy: 1
    
    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # General
    CONFIG_FPU=y
    CONFIG_NRF_MODEM_LIB=y
    CONFIG_STDOUT_CONSOLE=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    CONFIG_LOG=y
    CONFIG_LOG_MODE_IMMEDIATE=y
    
    # GNSS sample
    # Enable to use nRF Cloud A-GPS
    CONFIG_GNSS_SAMPLE_ASSISTANCE_NRF_CLOUD=y
    
    # LTE Link Control
    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
    # Request eDRX from the network
    CONFIG_LTE_EDRX_REQ=y
    # PSM requested periodic TAU 8 hours
    CONFIG_LTE_PSM_REQ_RPTAU="00101000"
    # PSM requested active time 6 seconds
    CONFIG_LTE_PSM_REQ_RAT="00000011"
    # Auto-connect should be left off as we want the application to control LTE
    CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
    
    # AT Host library - Used to send AT commands directy from an UART terminal and to allow
    #		    integration with nRF Connect for Desktop LTE Link monitor application.
    CONFIG_AT_HOST_LIBRARY=y
    
    # Networking
    CONFIG_NETWORKING=y
    CONFIG_NET_SOCKETS_OFFLOAD=y
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_POSIX_NAMES=y
    # Disable native network stack to save some memory
    CONFIG_NET_NATIVE=n
    
    # Memory and stack configuration
    CONFIG_HEAP_MEM_POOL_SIZE=2048
    CONFIG_MAIN_STACK_SIZE=4096
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536
    

  • I can't see that CONFIG_NRF_CLOUD_AGPS is enabled in the asset tracker. Where are you enabling this?

  • Hi Hakon,

    I see in the booting log of the asset this line :

    [00:00:11.326,660] <dbg> data_module: agps_request_handle: A-GPS request sent

    i think that the A-GPS are activated and the request send but i don't see that are any message for received or processed the A-GPS data.

    Best regards

  • You can try setting CONFIG_NRF_CLOUD_AGPS=y.

Related