This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 AGPS sample and nRF Cloud

I am using

MF V1.3

NCS V1.6.0

nRF9160Dk V0.15.0

Project: AGPS Sample

If i set the Interval in the gps_config structure to any number under 240 and run the sample i will see a message received in the terminal window of the nRF Cloud after every FIX and "GPS Position Sent to Cloud" message in the LTE Link Monitor.

struct gps_config gps_cfg = {
		.nav_mode = GPS_NAV_MODE_PERIODIC,
		.power_mode = GPS_POWER_MODE_DISABLED,
		.timeout = 120,
		.interval = 200,  //WRC changed to 200
		.priority = true,
	};

If i set the interval to greater than 300 i only get the message in the nRF Cloud after bootup, but never get another message received even though the LTE link Monitor says there is a FIX and "GPS Position Sent to Cloud"

D: NMEA: Position fix
I: GPS position sent to cloud

thoughts?

Parents Reply Children
  • I changed mqtt keepalive to 200 and performed same tests as you did and I am able to get messages on nRFCloud every 10 minutes with interval set to 600 seconds.

    Then I changed interval  to 3600 seconds and I am seeing mqtt errors in the logs and no messages in nRFCloud.

     

    The test I need to do is for update every 4 hours and 24 hours because that is going to be the application. If 1 hour interval is not working then 4 hours and 24 hours will not work as well


  • Hello, 

    No, I'm afraid no updates at the moment. Will poke our developers. 

    Kind regards,
    Øyvind

  • I tried to log GPS performance over serial log last night but for some reason board only sends data for first half an hour and stops. For my comparison test it is ok if data is not coming to nRF Cloud but if can GPS fixes data over serial terminal I can manage my test. 

  • Hello, the nRF Cloud team responds with the following answer:

    The AGPS sample does not handle long intervals like this, as it does not implement complete error detection and recovery of link errors. This sample, like all samples in the nRF Connect SDK, are only meant to demonstrate a particular aspect of the SDK, and are not meant to be used as production-ready examples.

    If the final application is to only obtain a fix every 4+ hours, then the application should disconnect from the cloud immediately after AGPS is received and data is sent to the cloud, and then reconnect again 4 hours later to repeat the process. I'm assuming for simplicity that there are no other cloud services needed during the 4 hour wait time. This will save a lot of power and prevent wasted data bandwidth with all the required keepalive messages.

    The asset_tracker_v2 application is a much more complete example of how to do this correctly.

    Kind regards,
    Øyvind

Related