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!

Parents
  • 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

  •  I just tested a location sample directly from Github, sdk-nrf-main version 1.8.99, the C:\sdk-nrf-main\samples\nrf9160\location sample directory is the one I am using.  Within that file the unmodified .prj file contains the contents below.  It includes, Cloud, Rest, JWT, and Multicell by default.  When I try to set those to "n", I get the error.  I'd be glad to attach the zip of the sample project but I couldn't see a way to post it to my response.

    #
    # Copyright (c) 2021 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #

    # General config
    CONFIG_FPU=y
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    CONFIG_NRF_MODEM_LIB=y

    # Heap and stacks
    CONFIG_MAIN_STACK_SIZE=2048
    # Extended memory heap size needed for encoding REST messages to JSON
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536

    # Location sample
    CONFIG_LOCATION=y
    #CONFIG_LOCATION_SAMPLE_GNSS_ANTENNA_EXTERNAL=y

    # Logging
    CONFIG_LOG=y
    CONFIG_LOG_MODE_IMMEDIATE=y

    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_NATIVE=n
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_OFFLOAD=y

    # LTE link control
    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
    CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
    CONFIG_LTE_EDRX_REQ=y
    # Request PSM active time of 8 seconds.
    CONFIG_LTE_PSM_REQ_RAT="00000100"

    # nRF Cloud (for A-GPS and cell location)
    CONFIG_NRF_CLOUD_REST=y
    CONFIG_NRF_CLOUD_AGPS=y
    CONFIG_MODEM_INFO=y # required by CONFIG_NRF_CLOUD_AGPS
    CONFIG_MODEM_INFO_ADD_NETWORK=y # required by CONFIG_NRF_CLOUD_AGPS

    # Library that maintains the current date time UTC for A-GPS and P-GPS purposes
    CONFIG_DATE_TIME=y

    # Modem JWT
    CONFIG_MODEM_JWT=y

    # Multicell location service selection
    CONFIG_MULTICELL_LOCATION_SERVICE_NRF_CLOUD=y

Reply
  •  I just tested a location sample directly from Github, sdk-nrf-main version 1.8.99, the C:\sdk-nrf-main\samples\nrf9160\location sample directory is the one I am using.  Within that file the unmodified .prj file contains the contents below.  It includes, Cloud, Rest, JWT, and Multicell by default.  When I try to set those to "n", I get the error.  I'd be glad to attach the zip of the sample project but I couldn't see a way to post it to my response.

    #
    # Copyright (c) 2021 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #

    # General config
    CONFIG_FPU=y
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    CONFIG_NRF_MODEM_LIB=y

    # Heap and stacks
    CONFIG_MAIN_STACK_SIZE=2048
    # Extended memory heap size needed for encoding REST messages to JSON
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536

    # Location sample
    CONFIG_LOCATION=y
    #CONFIG_LOCATION_SAMPLE_GNSS_ANTENNA_EXTERNAL=y

    # Logging
    CONFIG_LOG=y
    CONFIG_LOG_MODE_IMMEDIATE=y

    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_NATIVE=n
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_OFFLOAD=y

    # LTE link control
    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
    CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
    CONFIG_LTE_EDRX_REQ=y
    # Request PSM active time of 8 seconds.
    CONFIG_LTE_PSM_REQ_RAT="00000100"

    # nRF Cloud (for A-GPS and cell location)
    CONFIG_NRF_CLOUD_REST=y
    CONFIG_NRF_CLOUD_AGPS=y
    CONFIG_MODEM_INFO=y # required by CONFIG_NRF_CLOUD_AGPS
    CONFIG_MODEM_INFO_ADD_NETWORK=y # required by CONFIG_NRF_CLOUD_AGPS

    # Library that maintains the current date time UTC for A-GPS and P-GPS purposes
    CONFIG_DATE_TIME=y

    # Modem JWT
    CONFIG_MODEM_JWT=y

    # Multicell location service selection
    CONFIG_MULTICELL_LOCATION_SERVICE_NRF_CLOUD=y

Children
No Data
Related