AT Commands For GPS
No | Command | Description |
F1701 | AT+CGPS | Start/Stop GPS session |
F1702 | AT+CGPSINFO | Get GPS fixed position information |
F1703 | AT+CGPSCOLD | Cold start GPS |
F1704 | AT+CGPSHOT | Hot start GPS |
F1705 | AT+CGPSURL | Set AGPS default server URL |
F1706 | AT+CGPSSSL | Set AGPS transport security |
F1707 | AT+CGPSAUTO | Start GPS automatic |
F1708 | AT+CGPSNMEA | Configure NMEA sentence type |
F1709 | AT+CGPSNMEARATE | Set NMEA output rate |
F1710 | AT+CGPSMD | Configure AGPS MO method |
F1711 | AT+CGPSFTM | Start GPS test mode |
F1712 | AT+CGPSDEL | Delete the GPS information |
F1713 | AT+CGPSXE | Enable/Disable GPS XTRA function |
F1714 | AT+CGPSXD | Download XTRA assistant file |
F1715 | AT+CGPSXDAUTO | Download XTRA assistant file automatically |
F1716 | AT+CGPSPMD | Configure positioning mode |
F1717 | AT+CGPSMSB | Configure based mode switch to standalone |
F1718 | AT+CGPSHOR | Configure positioning desired accuracy |
F1719 | AT+CGNSSINFO | Get GNSS fixed position information |
F1720 | AT+CGNSSMODE | Configure GNSS support mode |
F1701 AT+CGPS Start/Stop GPS Session
This command is used to start or stop GPS session.
T) AT+CGPS=? |
+CGPS: (list of supported <on/off>s),( list of supported <mode>s) OK |
R) AT+CGPS? |
+CGPS: <on/off>,<mode> OK |
W) AT+CGPS=<on/off>[,<mode>] |
OK If UE-assisted mode, when fixed will report indication: +CGPS:<lat>,<lon>,<alt>,<date>,<time> If <off>, it will report indication: +CGPS:0 or ERROR |
<on/off> |
Values reserved by the present document: 0 stop GPS session 1 start GPS session |
<mode> |
Ignore standalone mode 1 standalone mode 2 UE-based mode 3 UE-assisted mode |
<lat> | Latitude of current position. Unit is in 10^8 degree |
<lon> | Longitude of current position. Unit is in 10^8 degree |
<date> | UTC Date. Output format is ddmmyyyy |
<time> | UTC Time. Output format is hhmmss.s |
<alt> | MSL Altitude. Unit is meters. |
Example |
AT+CGPS? +CGPS:1 OK AT+CGPS=1 OK |
F1702 AT+CGPSINFO Get GPS Fixed Position Infomation
This command is used to get current position information.
T) AT+CGPSINFO=? |
+CGPSINFO: (scope of <time>) OK |
R) AT+CGPSINFO? |
+CGPSINFO: <time> OK |
W) AT+CGPSINFO=<time> |
OK +CGPSINFO:[<lat>],[<N/S>],[<log>],[<E/W>],[<date>],[<UTCtime>],[<alt>],[<speed>],[<course>] If <off>, it will report indication: OK (if <time>=0) |
E) AT+CGPSINFO |
+CGPSINFO:[<lat>],[<N/S>],[<log>],[<E/W>],[<date>],[<UTCtime>],[<alt>],[<speed>],[<course>] OK |
<lat> | Latitude of current position. Output format is ddmm.mmmmmm |
<N/S> | N/S Indicator, N=north or S=south |
<log> | Longitude of current position. Output format is dddmm.mmmmmm |
<E/W> | E/W Indicator, E=east or W=west |
<date> | Date. Output format is ddmmyy |
<UTC time> | UTC Time. Output format is hhmmss.s |
<alt> | MSL Altitude. Unit is meters. |
<speed> | Speed Over Ground. Unit is knots. |
<course> | Course. Degrees. |
<time> | The range is 0-255, unit is second, after set <time> will report the GPS information every the seconds. |
Example |
AT+CGPSINFO=? +CGPSINFO: (0-255) OK AT+CGPSINFO? +CGPSINFO: 0 OK AT+CGPSINFO +CGPSINFO:3113.343286,N,12121.234064,E,250311,072809.3,44.1,0.0,0 OK |
F1703 AT+CGPSCOLD Cold Start GPS
This command is used to cold start a GPS session.
T) AT+CGPSCOLD=? | OK |
E) AT+CGPSCOLD | OK |
Example |
AT+CGPSCOLD=? OK AT+CGPSCOLD OK |
NOTE
Before using this command, ensure GPS is off.
F1704 AT+CGPSHOT Hot Start GPS
This command is used to hot start GPS session.
T) AT+CGPSHOT=? | OK |
E) AT+CGPSHOT | OK |
Example |
AT+CGPSHOT=? OK AT+CGPSHOT OK |
NOTE
Before using this command, ensure GPS is off.
F1705 AT+CGPSURL Set AGPS Default Server URL
This command is used to set AGPS default server URL. It will take effect only after restarting.
T) AT+CGPSURL=? | OK |
R) AT+CGPSURL? |
+CGPSURL: <URL> OK |
W) AT+CGPSURL=<URL> |
OK or ERROR |
<URL> |
AGPS default server URL. It needs double quotation marks. NOTE: Max length of URL is 64. |
Example |
AT+CGPSURL=”123.123.123.123:8888” OK AT+CGPSURL? +CGPSURL: ”123.123.123.123:8888” OK |
NOTE
It will take effect only after restarting.
F1706 AT+CGPSSSL Set AGPS Transport Security
This command is used to select transport security, used certificate or not.
The certificate gets from local carrier. If the AGPS server doesn’t need certificate, execute AT+CGPSSSL=0.
T) AT+CGPSSSL=? |
+CGPSSSL: (list of supported<SSL>s) OK |
R) AT+CGPSSSL? |
+CGPSSSL: <SSL> OK |
W) AT+CGPSSSL=<SSL> |
OK or ERROR |
<SSL> |
0 don’t use certificate 1 use certificate |
Example |
AT+CGPSSSL=0 OK |
NOTE
This command is used to select transport security, used certificate or not.
The certificate gets from local carrier. If the AGPS server doesn’t need certificate, execute AT+CGPSSSL=0.
F1707 AT+CGPSAUTO Start GPS Automatic
This command is used to start GPS automaticly when module powers on, GPS is closed defaultly.
T) AT+CGPSAUTO=? |
+CGPSAUTO: (list of supported<auto>s) OK |
R) AT+CGPSAUTO? |
+CGPSAUTO: <auto> OK |
W) AT+CGPSAUTO=<auto> |
OK or ERROR |
<auto> |
0 Non-automatic 1 automatic |
Example |
AT+CGPSAUTO=1 OK |
NOTE
If GPS start automatically, its operation mode is standalone mode.. It will take effect only after restarting
F1708 AT+CGPSNMEA Configure NMEA Sentence Type
This command is used to configure NMEA output sentences which are generated by the gpsOne engine when position data is available.
T) AT+CGPSNMEA=? |
+CGPSNMEA: (list of supported<auto>s) OK |
R) AT+CGPSNMEA? |
+CGPSNMEA: <nmea> OK |
W) AT+CGPSNMEA=<nmea> |
OK or If GPS engine is running: ERROR |
<auto> |
Range – 0 to 2147483647 Bit 0 – GPGGA (Fix data) Bit 2 – GPGSV (GPS SVs in view) Bit 4 – GPVTG (Speed and heading info) Bit 7 – GLGSV (Glonass SV in view info) Bit 9 – GNGNS (new GGA message for GNSS) Bit 11 – GAGSV (GAL SVs in view) Bit 13 – GAVTG (GAL Speed and heading info) Bit 14 – GAGGA (GAL Fix data) Bit 16 – PQGSV (QZSS Enable PQGSV) Bit 18 – GPDTM (new DTM message for GAL) Bit 19 – GNGGA (Fix data) Bit 21 – GNVTG (GNSS: Speed and heading info) Bit 22 – GAGNS (GNS message for GAL) Bit 25 – GBGSV (BDS SV in view info) Bit 27 – GBVTG (BDS: Speed and heading info) Bit 29 – GIGSV (NAVIC SV in view info) Bit 30 – GNDTM (GNSS Datum Message) Set the desired NMEA sentence bit(s). If multiple NMEA sentence formats are desired, “OR” the desired bits together. |
Example |
AT+CGPSNMEA=200191 OK |
F1709 AT+CGPSNMEARATE Set NMEA Output Rate
This command is used to set nmea output rate.
T) AT+CGPSNMEARATE=? |
+CGPSNMEARATE: (list of supported<rate>) OK |
R) AT+CGPSNMEARATE? |
+CGPSNMEARATE: <rate> OK |
W) AT+CGPSNMEA=<rate> |
OK or ERROR |
<rate> |
0 output rate 1HZ 1 output rate 10HZ |
Example |
AT+CGPSNMEARATE=1 OK |
NOTE
the command will effect next open gps.
F1710 AT+CGPSMD Configure AGPS MO Method
This command specifies if the Mobile-Originated (MO) GPS session should use the control plane session or user plane session.
T) AT+CGPSMD=? |
+CGPSMD: (scope of<method>) OK |
R) AT+CGPSMD? |
+CGPSMD: <method> OK |
W) AT+CGPSMD=<method> |
OK or If GPS engine is running: ERROR |
<method> |
0 Control plane 1 User plane |
Example |
AT+CGPSMD=1 OK |
F1711 AT+CGPSFTM Start GPS Test Mode
This command is used to start GPS test mode.
T) AT+CGPSFTM=? | OK |
R) AT+CGPSFTM? |
+CGPSFTM: <on/off> OK |
W) AT+CGPSFTM=<on/off> |
OK or ERROR |
<on/off> |
0 Close test mode 1 Start test mode |
<CNo> | Satellite CNo value. Floating value. |
URC format |
$GPGSV[,<SV>,<CNo>][…] $GLGSV[,<SV>,<CNo>][…] $BDGSV[,<SV>,<CNo>][…] $GAGSV[,<SV>,<CNo>][…] $PQGSV[,<SV>,<CNo>][…] |
Example |
AT+CGPSFTM=1 OK $GPGSV,3,17.1,6,26.1,9,18.0,17,25.6,19,23.9,28,22.4,2,0.0,4,0.0,5,0.0,12,0.0 $GBGSV,230,23.5,229,27.4,220,26.9 $GQGSV,193,22.8,195,24.7 |
NOTE
URC sentence will report every 1 second.
F1712 AT+CGPSDEL Delete The GPS Information
This command is used to delete the GPS information. After executing the command, GPS start is cold start.
T) AT+CGPSDEL=? | OK |
E) AT+CGPSDEL | OK |
Example |
AT+CGPSDEL=? OK AT+CGPSDEL OK |
NODE
This command must be executed after GPS stopped
F1713 AT+CGPSXE Enable/Disable GPS XTRA Function
This command is used to enable/disable the GPS XTRA function.
T) AT+CGPSXE=? |
+CGPSXE: (list of supported<on/off>s) OK |
R) AT+CGPSXE? |
+CGPSXE: <on/off> OK |
W) AT+CGPSXE=<on/off> |
OK or ERROR |
<on/off> |
0 Disable GPS XTRA 1 Enable GPS XTRA |
Example |
AT+CGPSXE=? +CGPSXE: (0-1) OK
AT+CGPSXE=0 OK |
NOTE
XTRA function must download the assistant file from network by HTTP, so the APN must be set by AT+CGDCONT command.
It will take effect only after restarting
F1714 AT+CGPSXD Download XTRA Assistant File
This command is used to download the GPS XTRA assistant file from network through http protocol.
Module will download the latest assistant file form server and write the file into module.
T) AT+CGPSXD=? |
+CGPSXD: (list of supported<server>) OK |
R) AT+CGPSXD? |
+CGPSXD: <server> OK |
W) AT+CGPSXD=<server> |
OK +CGPSXD : <resp> or +CGPSXD : <resp> ERROR |
<server> |
0 XTRA primary server (precedence) 1 XTRA secondary server 2 XTRA tertiary server |
<resp> | refer to Unsolicited XTRA download Codes |
Example |
AT+CGPSXD=? +CGPSXD: (0-2) OK AT+CGPSXD=0 OK +CGPSXD: 0 |
F1715 AT+CGPSXDAUTO Download XTRA Assistant File Automatically
This command is used to control download assistant file automatically or not when GPS start.
XTRA function must enable for using this command.
If assistant file doesn’t exist or check error, the module will download and inject the assistant file automatically
T) AT+CGPSXDAUTO=? |
+CGPSXDAUTO: (list of supported<on/off>) OK |
R) AT+CGPSXDAUTO? |
+CGPSXDAUTO: <on/off> OK |
W) AT+CGPSXDAUTO=<on/off> |
OK Or ERROR |
<on/off> |
0 disable download automatically 1 enable download automatically |
Example |
AT+CGPSXDAUTO=? +CGPSXD: (0,1) OK AT+CGPSXDAUTO=0 OK |
F1716 AT+CGPSPMD Configure Positioning Mode
This command is used to configure the positioning modes support.
T) AT+CGPSPMD=? |
+CGPSPMD: (scope of <mode>) OK |
R) AT+CGPSPMD? |
+CGPSPMD: <mode> OK |
W) AT+CGPSPMD =<mode> |
OK or ERROR |
<mode> |
Default 65407 Range 1 to 65407 Each bit enables a supported positioning mode as follows: Bit 0 Standalone Bit 1 UP MS-based Bit 2 UP MS-assisted Bit 3 CP MS-based (2G) Bit 4 CP MS-assisted (2G) Bit 5 CP UE-based (3G) Bit 6 CP UE-assisted (3G) Bit 7 NOT USED Bit 8 UP MS-based (4G) Bit 9 UP MS-assisted(4G) Bit 10 CP MS-based (4G) Bit 11 CP MS-assisted (4G) Set the desired mode sentence bit(s). If multiple modes are desired, “OR” the desired bits together. Example, support standalone, UP MS-based and UP MS-assisted, set Binary value 0000 0111, is 7. |
Example |
AT+CGPSPMD=127 OK |
NOTE
Need to restart the module after setting the mode.
F1717 AT+CGPSMSB Configure Based Mode Switch To Standalone
This command is used to configure AGPS based mode switching to standalone mode automatically or not.
T) AT+CGPSMSB=? |
+CGPSMSB: (scope of <mode>) OK |
R) AT+CGPSMSB? |
+CGPSMSB: <mode> OK |
W) AT+CGPSMSB =<mode> |
OK or ERROR |
<mode> |
0 Don’t switch to standalone mode automatically 1 Switch to standalone mode automatically |
Example |
AT+CGPSMSB=0 OK |
NOTE
This command must be executed after GPS stopped.
F1718 AT+CGPSHOR Configure Positioning Desired Accuracy
The command is used to configure the positioning desired accuracy threshold in meters.
T) AT+CGPSHOR=? |
+CGPSHOR: (scope of <acc>),( scope of <acc_f>) OK |
R) AT+CGPSHOR? |
+CGPSHOR: <acc>,<acc_f> OK |
W) AT+CGPSHOR=<acc>,[,<acc_f>] |
OK or ERROR |
<acc> | Range 0 to 1800000, Default value is 50 |
Example |
AT+CGPSHOR=50 OK |
NOTE
This command must be executed after GPS stopped.
L1719 AT+CGNSSINFO Get GNSS Fixed Position Information
This command is used to get current position related information.
T) AT+CGNSSINFO=? |
+CGNSSINFO: (scope of <time>) OK |
R) AT+CGNSSINFO? |
+CGNSSINFO: <time> OK |
W) AT+CGNSSINFO=<time> |
OK +CGNSSINFO: [<mode>],[<GPS-SVs>],[<GLONASS-SVs>],[<BEIDOU-SVs>], [<lat>],[<N/S>],[<log>],[<E/W>],[<date>],[<UTC-time>],[<alt>], [<speed>],[<course>],[<PDOP>],[HDOP],[VDOP] OK (if <time>>=0) |
E) AT+CGNSSINFO |
+CGNSSINFO: [<mode>],[<GPS-SVs>],[<GLONASS-SVs>],[<BEIDOU-SVs>], [<lat>],[<N/S>],[<log>],[<E/W>],[<date>],[<UTC-time>],[<alt>],[<speed>],[<course>] ,[<PDOP>],[<HDOP>],[<VDOP>] OK |
<mode> | Fix mode 2=2D fix 3=3D fix |
<GPS-SVs> |
GPS satellite valid numbers scope: 00-12 |
<GLONASS-SVs> |
GLONASS satellite valid numbers scope: 00-12 |
<BEIDOU-SVs> |
BEIDOU satellite valid numbers scope: 00-12 |
<lat> |
Latitude of current position. Output format is ddmm.mmmmmm |
<N/S> | N/S Indicator, N=north or S=south |
<log> |
Longitude of current position. Output format is dddmm.mmmmmm |
<E/W> | E/W Indicator, E=east or W=west |
<date> |
Date. Output format is ddmmyy |
<UTC-time> |
UTC Time. Output format is hhmmss.s |
<alt> |
MSL Altitude. Unit is meters. |
<speed> |
Speed Over Ground. Unit is knots. |
<course> |
Course. Degrees. |
<PDOP> | Position Dilution Of Precision. |
<HDOP> | Horizontal Dilution Of Precision. |
<VDOP> | Vertical Dilution Of Precision. |
<time> | The range is 0-255, unit is second, after set <time> will report the GPS information every the seconds. |
Example |
AT+CGNSSINFO=? +CGNSSINFO: (0-255) OK AT+CGNSSINFO? +CGNSSINFO: 0 OK AT+CGNSSINFO +CGNSSINFO: 2,09,05,00,3113.330650,N,12121.262554,E,131117,091918.0,32.9,0.0,255.0,1.1,0.8,0.7 OK AT+CGNSSINFO (if not fix,will report null) +CGNSSINFO: ,,,,,,,,,,,,,,, OK |
F1720 AT+CGNSSMODE Configure GNSS Support Mode
This command is used to configure GPS, GLONASS, BEIDOU and QZSS support mode.
And DPO(Dynamic power optimization) status. Module should reboot to take effective.
T) AT+CGNSSMODE=? |
+CGNSSMODE: (scope of <gnss_mode>),(scope of <dpo_mode>) OK |
R) AT+CGNSSMODE? |
+CGNSSMODE: <gnss_mode>,<dpo_mode> OK |
W) AT+CGNSSMODE=<gnss_mode>[,<dpo_mode>] |
OK or ERROR |
<gnss_mode> |
Range 0 to 63 Bit0 GLONASS Bit1 BEIDOU Bit2 GALILEO Bit3 QZSS Bit4: GPS Bit5: NAVIC |
<dpo_mode> |
1 enable DPO 0 disable DPO |
Example |
AT+CGNSSMODE=15,1 OK |
NOTE
Module should reboot to take effective.
Unsolicited XTRA download Codes
Code of <err>
Code of <err> | Description |
0 | Assistant file download successfully |
1 | Assistant file doesn’t exist |
2 | Assistant file check error |
225 | Memory error |
227 | Network error |