Best possible LTE configuration for GPS fix

I have a thingy91 device and want to implement the following requirements.

Expectation:

NRF9160 should remain in deep sleep mode and on the button click event do the following activities and again go to deep sleep mode:

1) Register LTE-M/NB-OIT and connect to MN(Mobile Network)(IBasis simcard),

2) Acquire GPS(I am using AGPS)

3) Send this GPS fix to Azure Cloud.

NOTE: The duration of this button can be 1day to 4/5days. 


I am referring AGNSS example and configuration and applying it.

Can you please help me identify the best possible configurations to quickly use the GNSS to get a fix and put the LTE in Ideal mode: 

1) CONFIG_LTE_EDRX_REQ=y,  does this required for my requirement?
# PSM requested periodic TAU 8 hours
CONFIG_LTE_PSM_REQ_RPTAU="00101000"
# PSM requested active time 6 seconds
#CONFIG_LTE_PSM_REQ_RAT="00000011", is it possible to reduce to a minimum level of 2 seconds?
Please also explain which method is best for my scenario out of eDRX/PSM or both
Let me know if you need more details.
Parents
  • Hi 

    I would use PSM and set keep alive for 6 days as it is the maximum amount of time the device is allowed to sleep. I would not use eDRX. 

    Keep in mind PSM will only work if your network support it, so I would enable it and if it is supported. 

    Just in case you are not aware we also have a course on devacademy for Cellular IoT

    Regards

    Runar

  •  , Thanks for yor reply.

    Just want to inform that when I have button even then device will do the following activities:

    1)Connect to MN,

    2)Get GPS fix(AGNSS)

    3)Send data to cloud

    4)Trun off GNSS, LTE(Complete modem)

    5)Go to deep sleep mode to save the battery,

    So, my modem is completely remain turned off between gap of(could be 1day, 2days, 3days, 4days or 5days).

    In this case any use of keep alive?

    Keep alive means are you taking aboue this config:CONFIG_LTE_PSM_REQ_RAT or something else, can you let me know.

    Thanks

    Ramani

  • Hi 

    There is a few things here make me a bit uncertain of what the best solution would be. 

    For there to be any gain to turn the modem completely of instead of using PSM it should be of more than around 60 hours. If else you will spent more power doing all the connection with the central. However if you use Azure there is an known issue CIA-351 


    "
    If a device-bound message is sent to the device while it is in the LTE Power Saving Mode (PSM), the TCP connection will most likely be terminated by the server. Known symptoms of this are frequent reconnections to cloud, messages sent to Azure IoT Hub never arriving, and FOTA images being downloaded twice.

    Affected platforms: nRF9160

    Workaround: Avoid using LTE Power Saving Mode (PSM) and extended DRX intervals longer than approximately 30 seconds. This will reduce the risk of the issue occurring, at the cost of increased power consumption." 

    As I presume you don't want to wake up every 30 second it makes little sense to use PSM which again means you will use more power to do the handshaking with the central. 

    A way around this would be to for example use nRF Cloud or AWS. You could for example have a look at this lesson from our Cellular course  where we use nRF Cloud and send the data over to Azure to get around the Azure termination issue

    Regards

    Runar

  •  , your answer looks more suitable when I don't turn off the device, but my requirement is straightforward, 
    -> Come out from deep sleep mode(power off),

    ->Connect to LTE,

    ->Get GNSS fix


    -> Turn off LTE/GNSS/All other enabled modules and Go to deep sleep mode

    So, what LTE setting here will help me get the GNSS fix very quickly after LTE is connected to the Network?

  • That is correct, it all depends on how often you wake up. I will check regarding doing nothing else then just turning of everything,  however since you will need to reestablish the connection I'm not sure how much can be done to improve it. 

    Regards

    Runar

  • I had some rounds internally regarding your case:

    The short answer is that they should do tests and measurements, in the field.

    The longer answer is that it is complicated, and a lot of things to consider.

    Firstly, to get the fastest possible GPS fix, they should use A-GPS. However, that means they need an LTE connection before they use the GPS, which means that they need to wait for the LTE link to go idle before the GPS can run. Depending on the network, how long it takes to establish the LTE link, etc. this by itself might take longer than it would have taken to just get a GPS fix in the first place.

    Connecting to the network takes an indeterminate amount of time. If the network parameters are stored, it should be done very quickly (I haven't timed it, but I wouldn't say it takes longer than 1-2s). On the other hand, if the modem needs to do a full search, the SIM needs to refresh its profile, etc. we could be talking about several minutes.

    2 Getting the A-GPS data should be relatively quick. Again, I haven't timed it, but again I would say somewhere around, though probably a bit less than 1-2s. But, you can be unlucky and hit some DNS timeouts etc. and in that case it could end up taking over 30s.

    3. A typical RRC inactivity timer is around 10s. Though for some networks, it could be higher (some networks also have it lower). This can be helped with the use of RAI, though that depends on network support (NB-IoT is better on this front). RAI also works poorly with TCP, so in this case you might prefer to use a UDP based protocol instead.

    4. With fresh A-GPS data, you should get a GPS fix within a few seconds, assuming no other issues (HW, placement, etc.)

    On the other hand, a cold start (which is what they will get after the modem has been turned off), should give a fix after 30s to a minute.

    When using A-GPS, you also have to consider how to give the GPS stack time to run. Does the network support eDRX or PSM? Disconnecting from the network also takes (a bit of) time, and then they will have to re-connect afterwards, including setting up any required TLS connections.

    Another option could be to use P-GPS, so that they don't have to download new A-GPS data for each time. It will not help speed up the GPS fix as much as fresh A-GPS data, but it will get you most of the way there. However, I don't know how well that works when you turn the modem off and it looses it's time information.

    In general cellular is often the case of you have to try and do some measuring to see what will be the best solution for you. I would recommend trying solution where you don't shut the modem down as from my discussions internally they can't see that you would gain anything from shutting it down. 

    Regards

    Runar

  •  ,Thanks for your answer,

    I want to inform you, that I am using A-GPS.

    I will do the measurements of time required for the LTE connection, and GPS fix with different scenarios and let you know the result.

Reply Children
Related