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

Can not get GPS fix when running with LTE

Hi guys, 

I am developing an tracking app based on NRF9160. As I know, LTE only works with GPS when enabling PSM.

Here is my PSM configuration:

CONFIG_LTE_PSM_REQ_RPTAU="00000110"
CONFIG_LTE_PSM_REQ_RAT="00000000"

In my code, I am combining MQTT library and GPS controller APIs in the tracker sample. 

If I disable MQTT function, the GPS function can work and get fix even though it takes quite long.

But when I enable function modem_configure() and mqtt_connect() to MQTT broker, then enable GPS.

GPS can not get a fix even though I see in the log, sometime over 4 satellites are  being tracked. 

I see also in the log when connecting to LTE, TAU and active time is -1, is it correct ? 

And I have a question, when GPS gets fix then I start a work to send GPS data to the broker. Do I have to send AT command to active LTE to send data or just send ?

And when I have data to send, what APIs should I use to turn off GPS and enable it again after sending, assumption that I am using GPS_controller APIs in tracker sample.

We are developing several circuits using NRF9160, I need to bring it up soon for our customers.

Thanks you very much, 

Parents
  • Hi Xuan,

    Which network are you connecting to? (and what SIM card are you using?)
    Note that not all networks allow roaming SIM cards PSM or eDRX interval features (which are needed if you are going to use LTE + GPS "concurrently")

    Wich modem firmware version are you using?

    From your log, it does not look like your network allows you the PSM interval you requested. Either it was too short or it would now grant you the request most likely because of a roaming SIM(?).

    One tip when combining Mqtt and GPS is to have the GPS working in one thread and the mqtt communication in another thread so you do not get any blocking issues.


    In our GPS sample, you can enable is to use the SUPL library which will give you the A-GPS feature which will grant you a much better TTFF because it downloads the GPS data from the LTE network before searching for the Satellites.
    If you notice in this sample however is that you won't have any issues with PSM/eDRX because the sample instead switch from LTE mode to GPS mode by switching off the modem after it has downloaded the A-GPS data and then switch over to GPS.

    That is something you also could experiment with, however, especially for current consumption reasons its recommended to use the GPS in PSM mode or in eDRX intervals when available

    Best regards,
    Martin L.

  • Hi Martin,

    I am connecting to NB-IoT network, I am using a normal SIM data not roaming. I tested in my country.

    I am using the latest firmware 1.2. 

    When developing my tracking app, the main thread is used for configuring modem and MQTT poll. I reuse the GPS controller in the tracker app same shipped with SDK to create a GPS driver and I create a GPS event handler. When GPS gets fix, I send data. So, GPS and MQTT are running on two threads, so they do not block each other right. 

    I also want to integrate SUPL with a GPS event handler, but it seems that the SUPL session does not accept the A-GPS data structure returned from the GPS driver. If possible, could you give me a sample that integrates the SUPL library with a GPS event handler? I mean using a GPS driver similar to the tracking app sample.

    In the worst case, I have to turn off the modem, to get a GPS fix, then whenever I want to send data, I have to turn on the modem, reconnect to a broker server and send data. What GPS procedure should I use to enable GPS and disable GPS, so it can continue to use data from the first fix instead of trying to get fix again?

  • Here is my log when tracing on link monitor, I hope it is helpful to figure out the problem.

    2020-06-09T06_42_14.251Z-log.txt

  • Hi,
    Sorry for the wait.

    From your log you are not getting approved PSM mode, which in turn does not give the proper functionality that you want when it comes to utilizing the GPS while having LTE ON as well.

    Please try to increase the periodic TAU value to see if the Network approves a longer interval. (or experiment with the AT client sample and request different values to see which are approved or not)

    2020-06-09T06:47:05.834Z DEBUG modem << [00:00:46.698,608] \x1B[0m<dbg> lte_lc.parse_psm_cfg: TAU: -1 sec, active time: -1 sec\x0A

    With regards to using the SUPL library, the sample that shows how to use it is the GPS sample.

Reply
  • Hi,
    Sorry for the wait.

    From your log you are not getting approved PSM mode, which in turn does not give the proper functionality that you want when it comes to utilizing the GPS while having LTE ON as well.

    Please try to increase the periodic TAU value to see if the Network approves a longer interval. (or experiment with the AT client sample and request different values to see which are approved or not)

    2020-06-09T06:47:05.834Z DEBUG modem << [00:00:46.698,608] \x1B[0m<dbg> lte_lc.parse_psm_cfg: TAU: -1 sec, active time: -1 sec\x0A

    With regards to using the SUPL library, the sample that shows how to use it is the GPS sample.

Children
No Data
Related