This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Location API without Cloud Dependencies (GNSS Only)

I am developing a solution using the NRF9160.  The device is successfully reporting to my server using a blend of the Location and HTTPS samples.  I would like to operate under GNSS only (no multicell) but I am unable to disable NRF Cloud or JWT by setting JWT and Cloud configs to No in the .prj file.  Is it possible to disable those services but maintain the Location library?  When the application runs, I still get a warning about inability to connect to AGPS even though I never request AGPS.

I am setting my location config to GNSS only with this,

enum location_method methods[] = {LOCATION_METHOD_GNSS};

Do I need to turn off AGPS anywhere else?  When I test using the GNSS sample I acquire a fix faster than when I use the Location sample with GNSS only, so I think somehow AGPS is still on and timing out.

Thanks!

  • Hi David,

    I am not sure which "Location example" you used on your application now. The official nRF9160: GNSS sample on NCS1.8.0 uses only GNSS by default, you can test and refer to it for your application.

    Best regards,

    Charlie

  • The Location sample I was referring to is the "location" sample located in nrf\samples\nrf9160\location, it is based on the location library from https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/nrf/libraries/modem/location.html#location

    Even though I have not configured the use of AGPS, the system appears to still try to use it because I see this error on my serial term with the 9160, "[00:00:12.285,034] <err> location: nRF Cloud A-GPS request failed, error: -77"  I have provisioned the device with the credentials for my server, so I'm not surprised that AGPS would fail, but I'm confused why its still trying to use it since I'm never requesting AGPS and only request GNSS only.

    I have tested and used the GNSS sample you referred to in the past, that's what I meant when by, "When I test using the GNSS sample I acquire a fix faster than when I use the Location sample with GNSS only".  Apologies for the confusion in naming.

  • As a follow up, just wanted to note that the device does proceed past the error and continues to get a fix.  I was just interested if there is a configuration change I can make to suppress the AGPS request.  Looking at the underlying documentation for GNSS API I didn't see an option for disabling AGPS. the developer.nordicsemi.com/.../gnss_interface.html

  • Hi Devid,

    Thanks for your explanation. Do you have set "CONFIG_NRF_CLOUD_AGPS=y" configuration?

    I checked that source code it seems the error will happen when you have it set. 

    Best regards,

    Charlie

  • Thanks I tried setting CONFIG_NRF_CLOUD_AGPS and REST to n, but it still posts the message. Digging a little deeper it appears that the error is tied to the multicell dependency.  When I set CONFIG_MULTICELL_LOCATION_SERVICE_NRF_CLOUD=n i get a build error stating "At least one location service must be enabled"  So, it appears that the location lib is requiring multicell, which requires a cloud service...i think.  What is the right way to look at the available .prj options for a lib?  It's possible I am missing an option to prevent location from including multicell.  I hate to waste your time asking questions if I can learn where to look.  Thanks!

Related