Upload
buitu
View
227
Download
0
Embed Size (px)
Citation preview
GSM UART GNSS
Application Note
GSM/GPRS Module Series
Rev. GSM_UART_GNSS_Application_Note_V3.0
Date: 2013-08-16
www.quectel.com
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 1 / 13
Our aim is to provide customers with timely and comprehensive service. For any
assistance, please contact our company headquarter:
Quectel Wireless Solutions Co., Ltd.
Room 501, Building 13, No.99, Tianzhou Road, Shanghai, China, 200233
Tel: +86 21 5108 6236
Mail: [email protected]
Or our local office, for more information, please visit:
http://www.quectel.com/support/salesupport.aspx
For technical support, to report documentation errors, please visit:
http://www.quectel.com/support/techsupport.aspx
GENERAL NOTES
QUECTEL OFFERS THIS INFORMATION AS A SERVICE TO ITS CUSTOMERS. THE INFORMATION
PROVIDED IS BASED UPON CUSTOMERS’ REQUIREMENTS. QUECTEL MAKES EVERY EFFORT
TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE. QUECTEL DOES NOT
MAKE ANY WARRANTY AS TO THE INFORMATION CONTAINED HEREIN, AND DOES NOT ACCEPT
ANY LIABILITY FOR ANY INJURY, LOSS OR DAMAGE OF ANY KIND INCURRED BY USE OF OR
RELIANCE UPON THE INFORMATION. ALL INFORMATION SUPPLIED HEREIN ARE SUBJECT TO
CHANGE WITHOUT PRIOR NOTICE.
COPYRIGHT
THIS INFORMATION CONTAINED HERE IS PROPRIETARY TECHNICAL INFORMATION OF
QUECTEL CO., LTD. TRANSMITTABLE, REPRODUCTION, DISSEMINATION AND EDITING OF THIS
DOCUMENT AS WELL AS UTILIZATION OF THIS CONTENTS ARE FORBIDDEN WITHOUT
PERMISSION. OFFENDERS WILL BE HELD LIABLE FOR PAYMENT OF DAMAGES. ALL RIGHTS
ARE RESERVED IN THE EVENT OF A PATENT GRANT OR REGISTRATION OF A UTILITY MODEL
OR DESIGN.
Copyright © Quectel Wireless Solutions Co., Ltd. 2013. All rights reserved.
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 2 / 13
About the document
History
Revision Date Author Description
3.0 2013-08-16 Bob DENG/Ray XU Initial
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 3 / 13
Contents
About the document ................................................................................................................................... 2
Contents ....................................................................................................................................................... 3
Table Index ................................................................................................................................................... 4
Figure Index ................................................................................................................................................. 5
1 Introduction .......................................................................................................................................... 6
2 Description ........................................................................................................................................... 7
2.1. AT Command Syntax ............................................................................................................... 7
2.2. Description of AT Command .................................................................................................... 7
2.2.1. AT+QGPSRD Read GPS Data ..................................................................................... 7
2.2.2. AT+QGPSCFG GPS Configuration ............................................................................... 9
2.2.3. AT+QGPSCMD Send NMEA Commands Defined by Manufacturers ........................ 10
2.3. Hardware Connection ............................................................................................................ 11
3 Appendix A Reference ....................................................................................................................... 13
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 4 / 13
Table Index
TABLE 1: RELATED DOCUMENTS .................................................................................................................. 13
TABLE 2: TERMS AND ABBREVIATIONS ........................................................................................................ 13
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 5 / 13
Figure Index
FIGURE 1: REFERENCE DESIGN FOR IDENTICAL LEVEL .......................................................................... 12
FIGURE 2: REFERENCE DESIGN FOR DIFFERENT LEVEL ......................................................................... 12
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 6 / 13
1 Introduction
This document mainly introduces how to use the UART GPS function of Quectel module. With this
solution, MCU can get the GPS data from the module’s main UART by AT commands.
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 7 / 13
2 Description
2.1. AT Command Syntax
Test Command AT+<x>=? This command returns the list of parameters and value ranges
set by the corresponding Write Command or internal processes.
Read Command AT+<x>? This command returns the currently set value of the parameter
or parameters.
Write Command AT+<x>=<…> This command sets the user-definable parameter values.
Execution
Command AT+<x>
This command reads non-variable parameters affected by
internal processes in the GSM engine
2.2. Description of AT Command
2.2.1. AT+QGPSRD Read GPS Data
Get a variety of standard GPS NMEA data.
AT+QGPSRD Read GPS Data
Test Command
AT+QGPSRD=?
Response
+QGPSRD:
(“NMEA/GGA”,”NMEA/GLL”,”NMEA/GSA”,”NMEA/GSV”,”N
MEA/RMC”,”NMEA/VTG”,”NMEA/ZDA”)
OK
Read Command
AT+QGPSRD?
Response
+QGPSRD: “NMEA/GGA”
+QGPSRD: “NMEA/GLL”
+QGPSRD: “NMEA/GSA”
+QGPSRD: “NMEA/GSV”
+QGPSRD: “NMEA/RMC”
+QGPSRD: “NMEA/VTG”
+QGPSRD: “NMEA/ZDA”
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 8 / 13
Parameters
Example
AT+QGPSRD=? //Test mode.
+QGPSRD:
(“NMEA/GGA”,”NMEA/GLL”,”NMEA/GSA”,”NMEA/GSV”,”NMEA/RMC”,”NMEA/VTG”,”NMEA/ZDA
”)
OK
AT+QGPSRD? //Query the current parameter values.
+QGPSCFG: “NMEA/GGA”
+QGPSCFG: “NMEA/GLL”
+QGPSCFG: “NMEA/GSA”
+QGPSCFG: “NMEA/GSV”
+QGPSCFG: “NMEA/RMC”
+QGPSCFG: “NMEA/VTG”
+QGPSCFG: “NMEA/ZDA”
OK
AT+QGPSRD=”NMEA/GGA” //Query GGA NMEA sentence.
+QGPSRD: $GPGGA…..,
OK
AT+QGPSRD=”NMEA/GLL” //Query GLL NMEA sentence.
OK
Write Command
AT+ QGPSRD=<type>
Response
+QGPSRD: <NMEA Format Data>
OK
ERROR
Reference
<type> String parameter type, indicates the value of <type>.
“NMEA/GGA”
“NMEA/GLL”
“NMEA/GSA”
“NMEA/GSV”
“NMEA/RMC”
“NMEA/VTG”
“NMEA/ZDA”
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 9 / 13
+QGPSRD: $GPGLL…..,
OK
2.2.2. AT+QGPSCFG GPS Configuration
Parameters
1. Parameters will be automatically saved into NVRAM after they are configured successfully. This
command can be saved by AT&W.
2. If the module has three serial ports, it is recommended to use UART3 to connect GPS engines, or
use UART2 to connect GPS engines.
3. UART2 is also named as DBG_UART.
AT+QGPSCFG GPS Configuration
Test Command
AT+QGPSCFG=?
Response
+QGPSCFG: <type>,<value>
OK
Read Command
AT+QGPSCFG?
Response
+QGPSCFG: “GPSPORT”,”UART2”
+QGPSCFG: “GPSBAUD”,9600
+QGPSCFG: “GPSINIT”,0
OK
Write Command
AT+ QGPSCFG=<type>[,<value>]
Response
OK
ERROR
Reference
<type> String parameter type indicates the configuration parameter type.
“GPSPORT”
“GPSBAUD”
“GPSINIT”
<value> For different <type>, the <value> is shown as below::
If <type> is “GPSPORT”, <value> is “UART2” or “UART3”.
If <type> is “GPSBAUD”, <value> is baud rate such as 115200,57600,19200,9600,4800.
NOTES
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 10 / 13
Example
AT+QGPSCFG=? //Test mode.
+QGPSCFG: <type>,<value>
OK
AT+QGPSCFG? //Query the current parameter values.
+QGPSCFG: “GPSPORT”,”UART2”
+QGPSCFG: “GPSBAUD”,”9600”
+QGPSCFG: “GPSINIT”,0
OK
AT+QGPSCFG=”GPSPORT”,2 //Select the module’s UART2 port to receive GPS data.
OK
AT+QGPSCFG=”GPSBAUD”,9600 //Set the baud rate of the UART2 port to 9600 to receive GPS
data.
OK
2.2.3. AT+QGPSCMD Send NMEA Commands Defined by Manufacturers
Parameters
AT+QGPSCMD Send NMEA Commands Defined by Manufacturers
Test Command
AT+QGPSCMD=?
Response
+QGPCMD: <cmd_str>
OK
Read Command
AT+QGPSCMD?
Response
+QGPCMD: <cmd response>
OK
Write Command
AT+ QGPSCMD=<cmd_str>
Response
OK
ERROR
Reference
<cmd_str> String parameter type indicates NMEA private commands defined by manufacturers.
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 11 / 13
Example
AT+QGPSCMD=? //Test command.
+QGPCMD: <cmd_str>
OK
AT+QGPSCFG=”GPSINIT”,1 //GPS function initialized.
OK
AT+QGPSCFG=”GPSPORT”,”UART2” //Set GSM module’s UART2 to receive GPS data.
OK
AT+QGPSCFG=”GPSBAUD”,9600 //Set baud rate of UART port to 9600 to receive GPS
data.
OK
AT+QGPSCMD="$PMTK314,1,1,1,1,1,5,0,0,0,0,0,0,0,0,0,0,0,1,0*2D" //Send GPS NMEA private
command defined by MTK.
OK
AT+QGPSCMD? //Query the response of the command mentioned above.
+QGPSCMD: $PMTK001,314,3*36 //$PMTK001,314,3*36 is the response to above MTK
private NMEA command.
OK
AT+QGPSCFG=”GPSINIT”,0 //Turn off the GPS function.
OK
2.3. Hardware Connection
I/O level of all Quectel GSM modules is 2.8V. GPS/GNSS modules have two types of I/O level: 1.8V and
2.8V. You can get the I/O electric characteristics of UART from the document of Hardware Design. The
hardware connection between Quectel GSM modules and GPS/GNSS receiver is illustrated as below.
If GSM module has the similar I/O level with GPS/GNSS module. A 1K resistor is recommended to insert
between GSM module and GPS module for a better communication performance. It would be fine if GSM
and GPS/GNSS module are connected directly.
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 12 / 13
GSM module
RXD
TXD
TXD
RXD
GPS/GNSS
Module1K
1K
GNDGND
Figure 1: Reference Design for Identical Level
If the GSM and GPS module have different level respectively (1.8V and 2.8V), a level shift is employed.
The following picture shows the combination of resistor and transistor forming a level shift.
GSM module
TXD
RXD
1.8V
4.7K
VDD_EXT 4.7K
2K
TXD
RXD
GND
GPS/GNSS
module1K
GND
Figure 2: Reference Design for Different Level
1. VDD_EXT is the output voltage of GSM module. It is 2.8V voltage level.
2. Since GSM and GPS/GNSS module may have their own UART name, so all the name of UARTs are
unified as TXD and RXD.
NOTES
Quectel
Confidential
GSM/GPRS Module GSM UART GNSS Application Note
GSM_UART_GNSS_Application_Note Confidential / Released 13 / 13
3 Appendix A Reference
Table 1: Related Documents
SN Document name Remark
[1] NMEA-0183 standard
Table 2: Terms and Abbreviations
Abbreviation Description
NMEA National Marine Electronics Association
GNSS Global Navigation Satellite System.
Quectel
Confidential