LPWA Module Series
BG96 GNSS Application Note
BG96_GNSS_Application_Note 36 / 42
3
Examples
3.1. Turn on and off the GNSS
Default arguments are used in this example to turn on GNSS. After the GNSS is turned on, NMEA
sentences are output from "usbnmea" port by default, and GNSS can be turned off via
AT+QGPSEND
.
AT+QGPS=1
//Turn on GNSS.
OK
//After the GNSS is turned on, NMEA sentences will be output from "usbnmea" port by default.
AT+QGPSLOC?
//Obtain positioning information.
+QGPSLOC: 061951.00,3150.7223N,11711.9293E,0.7,62.2,2,0.00,0.0,0.0,110513,09
OK
AT+QGPSEND
//Turn off GNSS.
OK
3.2. Application of GNSS <NMEA_src>
When GNSS is turned on and
<NMEA_src>
is set to 1, NMEA sentences can be acquired directly via
AT+QGPSGNMEA
.
AT+QGPSCFG="nmeasrc",1
//Set
<NMEA_src>
to 1 to enable acquisition of NMEA
sentences via
AT+QGPSGNMEA
.
OK
AT+QGPSGNMEA="GGA"
//Acquire GGA sentences.
+QGPSGNMEA: $GPGGA,103647.0,3150.721154,N,11711.925873,E,1,02,4.7,59.8,M,-2.0,M,,*77
OK
AT+QGPSCFG="nmeasrc",0
//Set
<NMEA_src>
to 0 to disable acquisition of NMEA
sentences via
AT+QGPSGNMEA
.
OK
AT+QGPSGNMEA="GGA"
//Acquisition of NMEA sentences via
AT+QGPSGNMEA
is disabled, therefore GGA sentences cannot be acquired.