Asset Tracker V2 not waiting for AGNSS response

Hey,

I'm running into an issue attempting to use AGNSS & AWS IoT Core on a custom nRF9160-based board.

I have a Lambda function in AWS that listens for AGNSS requests on the IoT Core MQTT bus. It then proxies those requests to nRF Cloud, and submits the response to MQTT.

This intermittently works. If the AGNSS response is added within 1-2 seconds of receiving the request, the firmware successfully loads the AGNSS data and quickly determines its location.

If the AGNSS response takes more than 2 seconds (which is most of the time), the firmware never receives the response message. It attempts to determine a fix without AGNSS, which often times out.

I think this is happening because the firmware doesn't wait for a AGNSS response over MQTT, and cellular is unavailable when attempting to get a fix so the response is never received.

Is this a known issue and is there a good place to introduce a timeout so the firmware has time to receive the response?

Parents
  • Hi Forest,

    Michal is not available, and I am looking at your ticket now.

    Could you compare your AGNSS process implementation with nrf_cloud_agnss_process function in nrf\subsys\net\lib\nrf_cloud\src\nrf_cloud_agnss.c?

    I tested with Cellular: GNSS (nordicsemi.com) sample and add 10 seconds delay between AGNSS receive and process in nrf\samples\cellular\gnss\src\assistance.c, there is no problem with AGNSS injection.

    	err = nrf_cloud_rest_agnss_data_get(&rest_ctx, &request, &result);
    	if (err) {
    		LOG_ERR("Failed to get A-GNSS data, error: %d", err);
    		goto agnss_exit;
    	}
    
    	LOG_INF("Processing A-GNSS data");
    	
        k_sleep(K_SECONDS(10));//wait 10s beween AGNSS recive and process
    	
    	err = nrf_cloud_agnss_process(result.buf, result.agnss_sz);

    Below is the log.

    [00:00:02.566,467] <inf> gnss_sample: Requesting A-GNSS data: GPS ephe: 0xffffffff, alm: 0xffffffff
    [00:00:05.802,642] <inf> gnss_sample: Processing A-GNSS data
    +CSCON: 0
    [00:00:15.929,138] <inf> gnss_sample: A-GNSS data processed
    Tracking:  0 Using:  0 Unhealthy: 0
    -----------------------------------

    Disable the following lines in nrf\samples\cellular\gnss\src\main.c to prevent terminal content refresh.

    				//printf("\033[1;1H");
    				//printf("\033[2J");

    Best regards,

    Charlie

Reply
  • Hi Forest,

    Michal is not available, and I am looking at your ticket now.

    Could you compare your AGNSS process implementation with nrf_cloud_agnss_process function in nrf\subsys\net\lib\nrf_cloud\src\nrf_cloud_agnss.c?

    I tested with Cellular: GNSS (nordicsemi.com) sample and add 10 seconds delay between AGNSS receive and process in nrf\samples\cellular\gnss\src\assistance.c, there is no problem with AGNSS injection.

    	err = nrf_cloud_rest_agnss_data_get(&rest_ctx, &request, &result);
    	if (err) {
    		LOG_ERR("Failed to get A-GNSS data, error: %d", err);
    		goto agnss_exit;
    	}
    
    	LOG_INF("Processing A-GNSS data");
    	
        k_sleep(K_SECONDS(10));//wait 10s beween AGNSS recive and process
    	
    	err = nrf_cloud_agnss_process(result.buf, result.agnss_sz);

    Below is the log.

    [00:00:02.566,467] <inf> gnss_sample: Requesting A-GNSS data: GPS ephe: 0xffffffff, alm: 0xffffffff
    [00:00:05.802,642] <inf> gnss_sample: Processing A-GNSS data
    +CSCON: 0
    [00:00:15.929,138] <inf> gnss_sample: A-GNSS data processed
    Tracking:  0 Using:  0 Unhealthy: 0
    -----------------------------------

    Disable the following lines in nrf\samples\cellular\gnss\src\main.c to prevent terminal content refresh.

    				//printf("\033[1;1H");
    				//printf("\033[2J");

    Best regards,

    Charlie

Children
No Data
Related