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?

Related