A-GNSS not working in location sample

I've testing out the GNSS and Location samples. According to documentation, A-GNSS is enabled by default in the location sample but I am not able to confirm this both through the logs and the code.

When running the GNSS example with A-GNSS enabled, I can clearly see the FW connecting to LTE, GNSS requesting A-GNSS data, and FW downloading the data. The impact on getting a location is also visible.

I cannot see the same in the location example. Even in code, Location sample executes a print out when LOCATION_EVT_GNSS_ASSISTANCE_REQUEST event occurs instead requesting data from the cloud.

Am I missing something here in the Location sample? How can I get A-GNSS working with the location sample?

Parents
  • Hi,

    Which NCS version do you use?

    Have you tried unmodified sample?

    Can you show complete application log from location sample?

    Best regards,
    Dejan

  • I am using the unmodified location sample from NCS v2.9.0. The sample output is below:

    *** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
    *** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
    Location sample started
    
    Connecting to LTE...
    +CEREG: 2,"7EF4","0648BF0C",7
    +CSCON: 1
    +CEREG: 5,"7EF4","0648BF0C",7,,,"11100000","11100000"
    Connected to LTE
    %XTIME: "4A","5240428193054A","01"
    Waiting for current time
    Requesting location with short GNSS timeout to trigger fallback to cellular...
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,5070,265,40,11,8088,10332
    [00:00:11.161,315] <inf> nrf_cloud_info: Device ID: nrf-351901936411614
    [00:00:11.168,731] <inf> nrf_cloud_info: IMEI:      351901936411614
    [00:00:11.278,106] <inf> nrf_cloud_info: UUID:      50525631-3738-4f4d-800c-13280a5bc58d
    [00:00:11.286,926] <inf> nrf_cloud_info: Modem FW:  mfw_nrf9160_1.3.6
    [00:00:11.293,731] <inf> nrf_cloud_info: Protocol:          REST
    [00:00:11.300,140] <inf> nrf_cloud_info: Download protocol: HTTPS
    [00:00:11.306,640] <inf> nrf_cloud_info: Sec tag:           16842753
    [00:00:11.313,385] <inf> nrf_cloud_info: Host name:         api.nrfcloud.com
    [00:00:20.266,235] <inf> location: Method specific timeout expired
    [00:00:20.273,162] <inf> location: Location retrieval failed using 'GNSS', trying with 'Cellular' next
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,5070,265,36,6,19606,5070,247,36,6,0,19392
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,19392,5070,265,44,14,19507,1,0
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,19392,5070,265,36,6,19686,1,1,5070,247,36,6,0
    +CSCON: 0
    +CSCON: 1
    Got location:
      method: Cellular
      latitude: *********
      longitude: ***********
      accuracy: 788.0 m
      date: 2025-04-24
      time: 18:39:59.248 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    
    Requesting location with the default configuration...
    +CSCON: 0
    [00:02:50.049,041] <inf> location: Method specific timeout expired
    [00:02:50.055,572] <wrn> location: GNSS timed out possibly due to too short GNSS time windows
    [00:02:50.065,124] <inf> location: Location retrieval failed using 'GNSS', trying with 'Cellular' next
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,5070,265,40,11,168395,5070,247,40,11,0,48249
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,48249,5070,265,40,9,169525,1,0
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,48249,5070,265,39,8,174795,1,0,"062BBA2A","302490","FA64",65535,0,2225,337,27,22,175647,0,0,"062BBA2A","302490","FA64",65535,0,66711,337,20
    +CSCON: 1
    Got location:
      method: Cellular
      latitude: *********
      longitude: ***********
      accuracy: 497.0 m
      date: 2025-04-24
      time: 18:42:35.234 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    
    Requesting low accuracy GNSS location...
    +CSCON: 0
    Got location:
      method: GNSS
      latitude: *********
      longitude: ***********
      accuracy: 10.3 m
      date: 2025-04-24
      time: 18:44:41.048 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    
    Requesting high accuracy GNSS location...
    Got location:
      method: GNSS
      latitude: *********
      longitude: ***********
      accuracy: 6.3 m
      date: 2025-04-24
      time: 18:44:45.168 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    
    Requesting 30s periodic GNSS location with cellular fallback...
    Got location:
      method: GNSS
      latitude: *********
      longitude: ***********
      accuracy: 11.2 m
      date: 2025-04-24
      time: 18:44:47.304 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    

Reply
  • I am using the unmodified location sample from NCS v2.9.0. The sample output is below:

    *** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
    *** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
    Location sample started
    
    Connecting to LTE...
    +CEREG: 2,"7EF4","0648BF0C",7
    +CSCON: 1
    +CEREG: 5,"7EF4","0648BF0C",7,,,"11100000","11100000"
    Connected to LTE
    %XTIME: "4A","5240428193054A","01"
    Waiting for current time
    Requesting location with short GNSS timeout to trigger fallback to cellular...
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,5070,265,40,11,8088,10332
    [00:00:11.161,315] <inf> nrf_cloud_info: Device ID: nrf-351901936411614
    [00:00:11.168,731] <inf> nrf_cloud_info: IMEI:      351901936411614
    [00:00:11.278,106] <inf> nrf_cloud_info: UUID:      50525631-3738-4f4d-800c-13280a5bc58d
    [00:00:11.286,926] <inf> nrf_cloud_info: Modem FW:  mfw_nrf9160_1.3.6
    [00:00:11.293,731] <inf> nrf_cloud_info: Protocol:          REST
    [00:00:11.300,140] <inf> nrf_cloud_info: Download protocol: HTTPS
    [00:00:11.306,640] <inf> nrf_cloud_info: Sec tag:           16842753
    [00:00:11.313,385] <inf> nrf_cloud_info: Host name:         api.nrfcloud.com
    [00:00:20.266,235] <inf> location: Method specific timeout expired
    [00:00:20.273,162] <inf> location: Location retrieval failed using 'GNSS', trying with 'Cellular' next
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,5070,265,36,6,19606,5070,247,36,6,0,19392
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,19392,5070,265,44,14,19507,1,0
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,19392,5070,265,36,6,19686,1,1,5070,247,36,6,0
    +CSCON: 0
    +CSCON: 1
    Got location:
      method: Cellular
      latitude: *********
      longitude: ***********
      accuracy: 788.0 m
      date: 2025-04-24
      time: 18:39:59.248 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    
    Requesting location with the default configuration...
    +CSCON: 0
    [00:02:50.049,041] <inf> location: Method specific timeout expired
    [00:02:50.055,572] <wrn> location: GNSS timed out possibly due to too short GNSS time windows
    [00:02:50.065,124] <inf> location: Location retrieval failed using 'GNSS', trying with 'Cellular' next
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,5070,265,40,11,168395,5070,247,40,11,0,48249
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,48249,5070,265,40,9,169525,1,0
    %NCELLMEAS: 0,"0648BF0C","302720","7EF4",432,48249,5070,265,39,8,174795,1,0,"062BBA2A","302490","FA64",65535,0,2225,337,27,22,175647,0,0,"062BBA2A","302490","FA64",65535,0,66711,337,20
    +CSCON: 1
    Got location:
      method: Cellular
      latitude: *********
      longitude: ***********
      accuracy: 497.0 m
      date: 2025-04-24
      time: 18:42:35.234 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    
    Requesting low accuracy GNSS location...
    +CSCON: 0
    Got location:
      method: GNSS
      latitude: *********
      longitude: ***********
      accuracy: 10.3 m
      date: 2025-04-24
      time: 18:44:41.048 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    
    Requesting high accuracy GNSS location...
    Got location:
      method: GNSS
      latitude: *********
      longitude: ***********
      accuracy: 6.3 m
      date: 2025-04-24
      time: 18:44:45.168 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    
    Requesting 30s periodic GNSS location with cellular fallback...
    Got location:
      method: GNSS
      latitude: *********
      longitude: ***********
      accuracy: 11.2 m
      date: 2025-04-24
      time: 18:44:47.304 UTC
      Google maps URL: https://maps.google.com/?q=*********,***********
    

Children
No Data
Related