BG96 GNSS example using A-GPS Google SUPL server

Worked example of MS-Based A-GPS operation (section 2.2 in below document).

Using cell ID information, the Google SUPL server can then supply a small amount of almanac information to the module to get a faster performance for time to fix and accuracy.

[2020-03-27_11:42:43:332]at+qcsq
// connected to NB1
[2020-03-27_11:42:43:332]+QCSQ: “CAT-NB1”,-86,-84,188,0
[2020-03-27_11:42:43:332]OK
[2020-03-27_11:42:45:635]at+cereg?

// attached
[2020-03-27_11:42:45:635]+CEREG: 2,1,”382D”,”8190B5B”,9
[2020-03-27_11:42:45:635]OK
[2020-03-27_11:42:56:523]at+qgpssuplurl?

// configured SUPL server to Google.
[2020-03-27_11:43:07:847]+QGPSSUPLURL: “supl.google.com:7275”
[2020-03-27_11:43:07:847]OK
[2020-03-27_11:43:19:658]at+qgdcnt?

// clear the data counter
[2020-03-27_11:43:19:660]+QGDCNT: 0,0
[2020-03-27_11:43:19:660]OK

// enable GPS to use MS based A-GPS mode
[2020-03-27_11:43:38:819]at+qgps=2
[2020-03-27_11:43:44:165]OK
[2020-03-27_11:43:44:791]

// data connection to SUPL server
[2020-03-27_11:43:44:791]+QCSCON: 1,1
[2020-03-27_11:43:56:313]

//ended connection to SUPL server
[2020-03-27_11:43:56:313]+QCSCON: 1,0
[2020-03-27_11:44:00:114]at+qgdcnt?

// check the data usage, is quite small.
[2020-03-27_11:44:00:116]+QGDCNT: 271,308
[2020-03-27_11:44:00:116]OK

// Check the NMEA port to verify, GPS is enabled and working ok.
[2020-03-27_11:44:32:659]$GPGSV,4,1,13,10,49,300,21,15,34,115,27,16,28,260,25,20,80,237,24,168
[2020-03-27_11:44:32:659]$GPGSV,4,2,13,21,64,132,21,23,,,26,26,23,295,29,27,24,222,31,154
[2020-03-27_11:44:32:659]$GPGSV,4,3,13,29,26,035,30,32,02,351,23,13,13,136,,41,,,34,158 [2020-03-27_11:44:32:659]$GPGSV,4,4,13,42,,,37,164
[2020-03-27_11:44:32:659]$GPGGA,004433.00,3750.437595,S,14444.574957,E,1,08,0.6,48.6,M,2.0,M,,73
[2020-03-27_11:44:32:674]$GPVTG,279.3,T,272.2,M,0.0,N,0.0,K,A29