0% found this document useful (0 votes)
354 views9 pages

MTK Packet User Manual

This document provides information about MTK NMEA packet formats and protocols. It defines various packet types for tasks like setting navigation modes, querying status, sending commands, and more. Packet structures are standardized with fields for talker ID, packet type, data, and checksum. Sample packet encodings are provided for each type.

Uploaded by

Ihtisham Uddin
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
354 views9 pages

MTK Packet User Manual

This document provides information about MTK NMEA packet formats and protocols. It defines various packet types for tasks like setting navigation modes, querying status, sending commands, and more. Packet structures are standardized with fields for talker ID, packet type, data, and checksum. Sample packet encodings are provided for each type.

Uploaded by

Ihtisham Uddin
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

ETEK NAVIGATION,INC.

P R O F E S S I O N A L I N N AV I G ATI O N & C O M M U N I C ATI O N

MTK NMEA Packet User Manual


Revision: 0.3
Linked FW Version: 1.902_06
Release Date: 2006/05/02

MediaTek Inc.
MTK NMEA Packet Format
Preamble TalkerID PktType DataField * CHK1 CHK2 CR LF

Packet Length:
The maximum length of each packet is restricted to 255 bytes

Packet Contents:
Preamble: One byte character.
‘$’
TalkderID: Four bytes character string.
“PMTK”
PktType: Three bytes character string.
From “000” to “999”
An identifier used to tell the decoder how to decode the packet
DataField: The DataField has variable length depending on the packet type.
A comma symbol ‘,’ must be inserted ahead each data filed to help the decoder
process the DataField.
*: 1 byte character. The star symbol is used to mark the end of DataField.
CHK1, CHK2: Two bytes character string.
CHK1 and CHK2 are the checksum of the data between Preamble and ‘*’.
CR, LF: Two bytes binary data.
The two bytes are used to identify the end of a packet.

Sample Packet:
$PMTK000*32<CR><LF>

1
ETEK NAVIGATION,INC.
P R O F E S S I O N A L I N N AV I G ATI O N & C O M M U N I C ATI O N

MTK NMEA Packet Protocol:


In order to inform the sender whether the receiver has received the packet, an acknowledge packet
PMTK_ACK should return after the receiver receives a packet.

MTK NMEA Packet List:

Packet Type: 000 PMTK_TEST ..................................................................................... 3


Packet Type: 001 PMTK_ACK ....................................................................................... 3
Packet Type: 010 PMTK_SYS_MSG .............................................................................. 3
Packet Type: 101 PMTK_CMD_HOT_START ................................................................... 3
Packet Type: 102 PMTK_CMD_WARM_START ................................................................ 3
Packet Type: 103 PMTK_CMD_COLD_START ................................................................ 3
Packet Type: 104 PMTK_CMD_FULL_COLD_START ......................................................... 3
Packet Type: 301 PMTK_API_SET_DGPS_MODE .............................................................. 4
Packet Type: 313 PMTK_API_SET_SBAS_ENABLED .......................................................... 4
Packet Type: 314 PMTK_API_SET_NMEA_OUTPUT ........................................................... 4
Packet Type: 320 PMTK_API_SET_PWR_SAV_MODE ........................................................ 4
Packet Type: 401 PMTK_API_Q_DGPS_MODE ................................................................. 4
Packet Type: 413 PMTK_API_Q_SBAS_ENABLED ............................................................. 4
Packet Type: 414 PMTK_API_Q_NMEA_OUTPUT ............................................................. 5
Packet Type: 420 PMTK_API_Q_PWR_SAV_MODE ........................................................... 6
Packet Type: 501 PMTK_DT_DGPS_MODE ..................................................................... 6
Packet Type: 513 PMTK_DT_SBAS_ENABLED ................................................................ 7
Packet Type: 514 PMTK_DT_NMEA_OUTPUT ................................................................... 7
Packet Type: 520 PMTK_DT_PWR_SAV_MODE ............................................................... 7
Packet Type: 604 PMTK_Q_VERSION ........................................................................... 7
Packet Type: 704 PMTK_DT_VERSION ......................................................................... 7

2
ETEK NAVIGATION,INC.
P R O F E S S I O N A L I N N AV I G ATI O N & C O M M U N I C ATI O N

Packet Type: 000 PMTK_TEST


Packet Meaning:
Test Packet.
DataField:
None
Example:
$PMTK000*32<CR><LF>

Packet Type: 001 PMTK_ACK


Packet Meaning:
Acknowledge Packet
DataField:
PktType: The packet type the acknowledge responds.
Flag: ‘0’ = Invalid packet.
‘1’ = Unsupported packet type
‘2’ = Valid packet, but action failed
‘3’ = Valid packet, and action succeeded
Example:
$PMTK001,101,0*33<CR><LF>

Packet Type: 010 PMTK_SYS_MSG


Packet Meaning:
Output system message
DataField:
Msg: The system message.
‘0’: UNKNOWN
‘1’: STARTUP
:
Example:
$PMTK010,001*2E<CR><LF>

Packet Type: 101 PMTK_CMD_HOT_START


Packet Meaning:
Hot Restart: Use all available data in the NV Store.
DataField:

3
ETEK NAVIGATION,INC.
P R O F E S S I O N A L I N N AV I G ATI O N & C O M M U N I C ATI O N

None
Example:
$PMTK101*32<CR><LF>

Packet Type: 102 PMTK_CMD_WARM_START


Packet Meaning:
Warm Restart: Don't use Ephemeris at re-start.
DataField:
None
Example:
$PMTK102*31<CR><LF>

Packet Type: 103 PMTK_CMD_COLD_START


Packet Meaning:
Cold Restart: Don't use Time, Position, Almanacs and Ephemeris data at re-start.
DataField:
None
Example:
$PMTK103*30<CR><LF>

Packet Type: 104 PMTK_CMD_FULL_COLD_START


Packet Meaning:
Full Cold Restart: It’s essentially a Cold Restart, but additionally clear system/user
configurations at re-start. That is, reset the receiver to the factory status.
DataField:
None
Example:
$PMTK104*37<CR><LF>

Packet Type: 301 PMTK_API_SET_DGPS_MODE


Packet Meaning:
API_Set_Dgps_Mode
DGPS correction data source mode.
DataField:
PMTK301,Mode
Mode: DGPS data source mode.

4
ETEK NAVIGATION,INC.
P R O F E S S I O N A L I N N AV I G ATI O N & C O M M U N I C ATI O N

‘0’: No DGPS source


‘1’: RTCM
‘2’: WAAS
Example:
$PMTK301,1*2D<CR><LF>

Packet Type: 313 PMTK_API_SET_SBAS_ENABLED


Packet Meaning:
API_Set_Sbas_Enabled
Enable to search a SBAS satellite or not.
DataField:
Enabled: Enable or disable
‘0’ = Disable
‘1’ = Enable
Example:
$PMTK313,1*2E<CR><LF>

Packet Type: 314 PMTK_API_SET_NMEA_OUTPUT


Packet Meaning:
API_Set_NMEA_Out
Set NMEA sentence output frequencies.
DataField:
There are totally 17 data fields that present output frequencies for the 17 supported NMEA
sentences individually.
Supported NMEA Sentences
0 NMEA_SEN_GLL, // GPGLL interval - Geographic Position - Latitude longitude
1 NMEA_SEN_RMC, // GPRMC interval - Recommended Minimum Specific GNSS Sentence
2 NMEA_SEN_VTG, // GPVTG interval - Course Over Ground and Ground Speed
3 NMEA_SEN_GGA, // GPGGA interval - GPS Fix Data
4 NMEA_SEN_GSA, // GPGSA interval - GNSS DOPS and Active Satellites
5 NMEA_SEN_GSV, // GPGSV interval - GNSS Satellites in View
6 NMEA_SEN_GRS, // GPGRS interval - GNSS Range Residuals
7 NMEA_SEN_GST, // GPGST interval - GNSS Pseudorange Errors Statistics
13 NMEA_SEN_MALM, // PMTKALM interval - GPS almanac information
14 NMEA_SEN_MEPH, // PMTKEPH interval - GPS ephmeris information
15 NMEA_SEN_MDGP, // PMTKDGP interval - GPS differential correction information
16 NMEA_SEN_MDBG, // PMTKDBG interval – MTK debug information

5
ETEK NAVIGATION,INC.
P R O F E S S I O N A L I N N AV I G ATI O N & C O M M U N I C ATI O N

Supported Frequency Setting


0 - Disabled or not supported sentence
1 - Output once every one position fix
2 - Output once every two position fixes
3 - Output once every three position fixes
4 - Output once every four position fixes
5 - Output once every five position fixes

Example:
$PMTK314,1,1,1,1,1,5,1,1,1,1,1,1,0,1,1,1,1*2C<CR><LF>

This command set GLL output frequency to be outputting once every 1 position fix, and RMC to be
outputting once every 1 position fix, and so on.

You can also restore the system default setting via issue:

$PMTK314,-1*04<CR><LF>

Packet Type: 320 PMTK_API_SET_PWR_SAV_MODE


Packet Meaning:
API_Set_Pwr_Sav_Mode
Set power saving operation mode.
DataField:
PMTK320,Mode
Mode: 0: PWR_SAV_OFF: power saving mode off
1: PWR_SAV_ON: power saving mode on
Example:
$PMTK320,0*26<CR><LF>

Packet Type: 401 PMTK_API_Q_DGPS_MODE


Packet Meaning:
API_Query_Dgps_Mode
DataField:
None
Return:
PMTK_DT_DGPS_MODE
Example:

6
ETEK NAVIGATION,INC.
P R O F E S S I O N A L I N N AV I G ATI O N & C O M M U N I C ATI O N

$PMTK401*37<CR><LF>

Packet Type: 413 PMTK_API_Q_SBAS_ENABLED


Packet Meaning:
API_Query_Sbas_Enabled
DataField:
None
Return:
PMTK_DT_SBAS_ENABLED
Example:
$PMTK413*34<CR><LF>

Packet Type: 414 PMTK_API_Q_NMEA_OUTPUT


Packet Meaning:
API_Query_NMEA_Out
Query current NMEA sentence output frequencies.
DataField:
None
Return:
PMTK_DT_NMEA_OUTPUT
Example:
$PMTK414*33<CR><LF>

Packet Type: 420 PMTK_API_Q_PWR_SAV_MODE


Packet Meaning:
API_Query_Pwr_Sav_Mode
Query power saving operation mode.
DataField:
None
Return:
PMTK_DT_PWR_SAV_MODE
Example:
$PMTK420*3F<CR><LF>

Packet Type: 501 PMTK_DT_DGPS_MODE


Packet Meaning:

7
ETEK NAVIGATION,INC.
P R O F E S S I O N A L I N N AV I G ATI O N & C O M M U N I C ATI O N

DGPS Data Source Mode


DataField:
Mode: DGPS data source mode
‘0’: No DGPS source
‘1’: RTCM
‘2’: WAAS
Example:
$PMTK501,1*2B<CR><LF>

Packet Type: 513 PMTK_DT_SBAS_ENABLED


Packet Meaning:
Enable to search a SBAS satellite or not.
DataField:
Enabled: Enable or disable
‘0’ = Disable
‘1’ = Enable
Example:
$PMTK513,1*28<CR><LF>

Packet Type: 514 PMTK_DT_NMEA_OUTPUT


Packet Meaning:
NMEA sentence output frequency setting
DataField:
There are totally 17 data fields that present output frequencies for the 17 supported NMEA
sentences individually. Please refer to PMTK_API_SET_NMEA_OUTPUT for the Supported NMEA
Sentences and Frequency Setting.

Example:
$PMTK514,1,1,1,1,1,5,1,1,1,1,1,1,0,1,1,1,1*2A<CR><LF>

Packet Type: 520 PMTK_DT_PWR_SAV_MODE


Packet Meaning:
Power saving operation mode.

DataField:
PMTK520,Mode

8
ETEK NAVIGATION,INC.
P R O F E S S I O N A L I N N AV I G ATI O N & C O M M U N I C ATI O N

Mode: 0: PWR_SAV_OFF: power saving mode off


1: PWR_SAV_ON: power saving mode on
Example:
$PMTK520,0*24<CR><LF>

Packet Type: 604 PMTK_Q_VERSION


Packet Meaning:
Query the version information of FW
DataField:
NONE
Return:
PMTK_DT_VERSION
Example:
$PMTK604*6D<CR><LF>

Packet Type: 704 PMTK_DT_VERSION


Packet Meaning:
Version information of FW.
DataField:
PMTK704,FWVrsn1, FWVrsn2, FWVrsn3
Vrsn: MainVersion_ReleaseNumber
Example:
$PMTK704,1.881_06,0606_m0138,0000*52<CR><LF>

You might also like