Control Plane Assisted GPS

Hello,

I’m developing a product using the HL8548-G modem. One of the requirements is to obtain a location fix within a minute or so of power up. The device’s primary function is tracking device for a short period of time after it is power on. I want to do this using assisted GPS via the control plane. The AGPS mode I would like to configure is MS-Based mode. Is there an app note or any pointers that are available I can read to help me setup the HL8548-G to perform this function?

Thanks,
Todd

Todd,

If you populate CGDCONT profile 4 with an APN then when you start the GPS session the unit will automatically dial into the Google SUPL server (assuming it is attached to the network) and download all of the assistance data the unit needs to obtain a quick TTFF. Note, if you start the session prior to the unit attaching then it will not automatically perform the dial after it has attached, it only tries when the session is started, this particularly affects you if powering the unit all up together, the GPS engine can be initialized and started before the unit has attached.

Regards

Hi mlw,

Thanks for the response. We tried your suggestion of switching to profile 4. However, it doesn’t seem to have an effect on the TTFF on a cold start. The sequence of commands that we use is:

at+cgdcont=4,"IP","epc.tmobile.com","0.0.0.0"
ok
at+gpspvt=4,1,1
OK
at+cmtlr=1
OK
at+cmtlra=1,0
+CME ERROR: 3
at+cmolr=2,1
OK
at+gpsstart=1
OK

The cold start TTFF is ranges from 1 minut to 4-ish minutes - with and without the aGPS. Is the sequence of commands correct? If not, what is wrong or missing?

Another pieces of information to note (may or may not be related)
Auto-initialization of GPS is off - so GPS is disabled upon power up.
at+cfun=1 is issued before the above sequence.

Thanks,
Todd

Todd,

Can you send the following to the unit and post the full script.

ati
at+cgmr
at+gpssuplcfg?
at+gpsconf?
at+gpsaid?
at+gpsautoinit?

I would say there isn’t much point in not have the GPS automatically initialise on power up.

I have attached a teraterm script that I have used in the past for TTFF testing.

Regards

Matt
HL8 GPS init.zip (482 Bytes)

Thanks Matt. I’ll issue the commands you suggest and post the results. And thanks for the teraterm script. It looks like we are following the same recipe but I will double check.

I’ll get back soon with the results.

Thanks,
Todd

Hi Matt,

Here is the output from the commands you listed. Let me know if there is anything that needs adjustment.

+KSUP: 2
at
OK

ati
HL8548-G

OK
at+cgmr
RHL85xx.5.5.14.0.201502091756.x6250_1

OK
at+gpssuplcfg?
+GPSSUPLCFG: 0,"supl.google.com",7276,1,0
+GPSSUPLCFG: 1,0,2,1

OK
at+gpsconf?
+GPSCONF: 0,0
+GPSCONF: 1,2
+GPSCONF: 10,1
+GPSCONF: 11,200,200

OK
at+gpsaid?
ERROR
CMTLRA
at+gpsautoinit?
+GPSAUTOINIT: 0

OK

Thanks,
Todd

Todd,

Re the problem itself. Can you also show me the CGDCONT accounts (at+cgdcont?). Is this a private APN (implying n internet access)? Does it require a username and password? Thing is that there is no way to tell if the connection has succeeded or failed (something I want to try to get changed with some unsolicited responses) and hence the aiding data being injected. Given that you are not seeing an improvement I suspect that it is failing for some reason.

Re support, can you tell me who you are buying through? Assuming it is an official channel then you should be getting some form of support from them (we have trained them all), even if it is just relaying Emails between yourself and the responsible apps engineer.

Regards

Matt

Thanks again Matt. This isn’t a private APN - we do have access. As far as I know it doesn’t require a username and password. Here is the results of all of the commands, including the cgdcont? query.

+PBREADY
at+cfun=1,0
OK
Issuing GSN
at+gsn
359516050200734

OK
359516050200734
Issuing gpspvt.
at+gpspvt=4,1,1
OK
info: at cmtlr
at+cmtlr=1
OK
at+cmtlra=1,0
+CME ERROR: 3
CMTLRA
at+cmolr=2,1
OK
at+gpsstart=1
OK
+GPSEVINIT: 1
+GPSEVSTART: 1
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m

+GPSEVPOS: 0
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
OK
+GPSEVSTOP: 1

+GPSEVPOS: 0
+CMOLRE:4
OK
atOK
atiHL8548-G
OK
atiHL8548-G
OK
at+cgmrRHL85xx.5.5.14.0.201502091756.x6250_1

OK
at+gpssuplcfg?+GPSSUPLCFG: 0,"supl.google.com",7276,1,0
+GPSSUPLCFG: 1,0,2,1

OK
at+gpsconf?+GPSCONF: 0,0
+GPSCONF: 1,2
+GPSCONF: 10,1
+GPSCONF: 11,200,200

OK
at+gpsaid?ERROR
at+gpsautoinit?+GPSAUTOINIT: 0

OK
at+cgdcont?+CGDCONT: 1,"IP","epc.tmobile.com","0.0.0.0",0,0
+CGDCONT: 4,"IP","epc.tmobile.com","0.0.0.0",0,0

OK

I’ll send a response to the private message for this part of the answer.

Thanks again.

Todd

Todd,

In the script I attached you can see the below

for i 1 10
	sendln "at+cgdcont?"
	wait "OK"
	pause 1
next

This was put there to see if the connection was happening, the IP address shown should go from 0.0.0.0 to x.x.x.x, it is requested every second because the connection is very fast (if you are running on 3G), once complete it will go back to 0.0.0.0. This is the best clue as to whether it is happening or not (you cannot even look at the current consumption as the GNSS masks it).

Can you try this in your application?

Regards

Matt

Hi Matt,

We tried your suggestion. This gave us enough to figure out that the PDP contexts were not being activated. Using the at+cgdcont? command - we saw that we weren’t obtaining an the IP addresses. We then figured out that we needed to activate the PDP contexts. Below is the output from one of my sessions with the modem. This one appeared to work properly. That is after starting the GPS within a minute the modem was able to obtain a fix. This is what I expected.

The output below starts off with the microcontroller issuing a few commands and then starting the GPS. I manually stop the GPS and issue a few commands +CGATT, +CGACT, +CGDCONT and then start the GPS again.

However, subsequent attempts at doing the same thing do not work and the TTFF of the modem ranges from 3 minutes to 6 minutes. There must something different that I’m missing. The output from the attempts that did not get a fix within a couple of minutes are identical to the output below - they just didn’t get a fix.

Since it worked once (or so I think it did), I think I’m close but I can’t pin down the variables affecting the results.

..Canopy Tracker - Oct  7 2016 13:28:50
+PBREADY
at+cfun=1,0
OK
Issuing GSN
at+gsn
359516050200734

OK
359516050200734
Issuing gpspvt.
at+gpspvt=4,1,1
OK
info: at cmtlr
at+cmtlr=1
OK
at+cmtlra=1,0
+CME ERROR: 3
CMTLRA
at+cmolr=2,1
OK
at+gpsstart=1
OK
+GPSEVINIT: 1
+GPSEVSTART: 1
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m

+GPSEVPOS: 0
OK
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
at+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+g+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
psstop+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
OK
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSEVSTOP: 1

+GPSEVPOS: 0
atiHL8548-G
OK
at+cgmrRHL85xx.5.5.14.0.201502091756.x6250_1

OK
at+gpssuplcfg?+GPSSUPLCFG: 0,"supl.google.com",7276,1,0
+GPSSUPLCFG: 1,0,2,1

OK
at+gpsconf?+GPSCONF: 0,0
+GPSCONF: 1,2
+GPSCONF: 10,1
+GPSCONF: 11,200,200

OK
at+gpssaid?ERROR
at+gpsaid?ERROR
atat+gpsautoinit?+CME ERROR: 3
at+gpsautoinit?+GPSAUTOINIT: 0

OK
atOK
at+at+cgdcont?ERROR
at+cgdcont?+CGDCONT: 1,"IP","epc.tmobile.com","0.0.0.0",0,0
+CGDCONT: 4,"IP","epc.tmobile.com","0.0.0.0",0,0

OK
at+cgatt?+CGATT: 1

OK
at+cgact?+CGACT: 1,0
+CGACT: 4,0

OK
at+cgact=1,1,4OK
at+cdgERROR
at+cgdcont?+CGDCONT: 1,"IP","epc.tmobile.com","21.230.233.168",0,0
+CGDCONT: 4,"IP","epc.tmobile.com","33.225.238.158",0,0

OK
at+gpspvt=4,1,1OK
at+cmtlr=1OK
at+cmtlra=1,0+CME ERROR: 3
at+cmolr=2,1OK
at+cgdcont?+CGDCONT: 1,"IP","epc.tmobile.com","21.230.233.168",0,0
+CGDCONT: 4,"IP","epc.tmobile.com","33.225.238.158",0,0

OK
at+gpsstart=1OK
+GPSEVSTART: 1
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m

+GPSEVPOS: 0
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,00:00:00,00/00/0000,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:33,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:33,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:34,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:34,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:36,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:36,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:37,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:37,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:38,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:38,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:40,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:40,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:41,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:41,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:42,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:42,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:43,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:43,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:44,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:44,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:46,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:46,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:46,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:46,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:48,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:48,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:49,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:49,28/06/2012,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:50,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:50,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:51,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:51,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:53,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:53,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:54,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:54,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:55,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:55,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:57,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:57,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:35:58,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:35:58,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:36:00,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:36:00,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSPVT:0,23:36:01,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
:0,23:36:01,10/11/2016,NO FIX,N 000 00'00.00",E 000 00'00.00",+0000m
+GPSEVPOS: 2
+GPSPVT:0,23:36:03,10/11/2016,2D FIX,N 045 27'44.44",W 122 47'57.43",+0019m
:0,23:36:03,10/11/2016,2D FIX,N 045 27'44.44",W 122 47'57.43",+0019m
+GPSPVT:0,23:36:04,10/11/2016,2D FIX,N 045 27'44.44",W 122 47'57.43",+0019m
:0,23:36:04,10/11/2016,2D FIX,N 045 27'44.44",W 122 47'57.43",+0019m
+GPSPVT:0,23:36:06,10/11/2016,2D FIX,N 045 27'44.47",W 122 47'56.96",+0019m
:0,23:36:06,10/11/2016,2D FIX,N 045 27'44.47",W 122 47'56.96",+0019m
+GPSPVT:0,23:36:07,10/11/2016,2D FIX,N 045 27'44.59",W 122 47'57.73",+0019m
:0,23:36:07,10/11/2016,2D FIX,N 045 27'44.59",W 122 47'57.73",+0019m
+GPSPVT:0,23:36:08,10/11/2016,2D FIX,N 045 27'44.47",W 122 47'56.85",+0019m
:0,23:36:08,10/11/2016,2D FIX,N 045 27'44.47",W 122 47'56.85",+0019m
+GPSPVT:0,23:36:10,10/11/2016,2D FIX,N 045 27'44.57",W 122 47'57.35",+0019m
:0,23:36:10,10/11/2016,2D FIX,N 045 27'44.57",W 122 47'57.35",+0019m
+GPSPVT:0,23:36:12,10/11/2016,2D FIX,N 045 27'44.21",W 122 47'56.69",+0019m
:0,23:36:12,10/11/2016,2D FIX,N 045 27'44.21",W 122 47'56.69",+0019m
+GPSPVT:0,23:36:13,10/11/2016,2D FIX,N 045 27'44.50",W 122 47'57.29",+0019m
:0,23:36:13,10/11/2016,2D FIX,N 045 27'44.50",W 122 47'57.29",+0019m
+GPSPVT:0,23:36:15,10/11/2016,2D FIX,N 045 27'44.55",W 122 47'57.76",+0019m
:0,23:36:15,10/11/2016,2D FIX,N 045 27'44.55",W 122 47'57.76",+0019m

Thanks,
Todd

Todd,

Couple of things.

  • Really would suggest upgrading the unit to 5.5.22.
  • The GPS auto init needs to be set to 1, this is the default, but it seems to have been changed to 0. All it does is load the GPS firmware up into the chipset, it has no real impact on current consumption or operation, it does not stat a session up or anything. It might be that if you do not have this set when you start the session the initialisation happens (takes around 5 seconds) but at the same time the unit has dialled into the server, got the aiding data and tried to apply it but is unable to do so because it has not been initialised, there will not be a retry mechanism in place.

If it is just the fact you are not getting a fix it will all be down to the antenna, when one works it works really well when one doesn’t it pretty consistently does not.

Regards

Matt