Ning Kailiang Electronics Blog 简体中文
GPS module commands

GPS module commands:What are the essential NMEA commands used with GPS modules?

Author:Ning Kailiang Electronics Blog · Date:20260916 · Cooperation · Report

This page answers the following questions about“GPS module commands”:What are the essential NMEA commands used with GPS modules?How do you change the update rate of a GPS module using commands?What command enables or disables specific NMEA sentences on a GPS module?How do you perform a hot start or reset on a GPS module via commands?What are the common serial communication parameters for GPS module commands?

Q: What are the essential NMEA commands used with GPS modules?

A: GPS modules primarily use NMEA 0183 standard sentences such as GGA, GLL, GSA, GSV, RMC, and VTG. The GGA sentence provides fix data including time, position, and altitude, while RMC gives recommended minimum data. These sentences are output by default at 1 Hz. To configure the module, users send proprietary commands like PMTK for MediaTek chips or UBX for u-blox. According to the u-blox 6 Receiver Description (2013), UBX messages are binary and allow advanced configuration. The NMEA 0183 standard (IEC 61162-1) defines the sentence structure.

Q: How do you change the update rate of a GPS module using commands?

A: For u-blox modules, you send a UBX-CFG-RATE command to set the measurement and navigation rate. For example, to set 5 Hz, configure measRate to 200 ms. For MediaTek modules, use PMTK220,<interval>, where interval is in milliseconds (e.g., PMTK220,200 for 5 Hz). According to the MediaTek GPS SDK documentation (2014), PMTK commands are ASCII-based and terminated with CR/LF. After sending, the module responds with a confirmation. Note that higher update rates may require disabling some NMEA sentences to avoid serial port overflow.

Q: What command enables or disables specific NMEA sentences on a GPS module?

A: On MediaTek modules, use PMTK314,<GLL>,<RMC>,<VTG>,<GGA>,<GSA>,<GSV>,<GRS>,<GST>,<ZDA>,<MCHN> where each value is 0 (disable) or 1 (enable) for each sentence. For example, PMTK314,0,1,0,1,0,0,0,0,0,0 enables only RMC and GGA. For u-blox, use UBX-CFG-MSG with the message class and ID, and set the rate to 0 to disable. According to the u-blox M8 Receiver Description (2018), this allows selective output. Always save configuration to non-volatile memory using UBX-CFG-CFG or PMTK314 then PMTK101.

Q: How do you perform a hot start or reset on a GPS module via commands?

A: For u-blox, UBX-CFG-RST with resetMode set to 0x0001 for hot start (backup), 0x0002 for warm start, or 0x0003 for cold start. For MediaTek, use PMTK101 for hot start, PMTK102 for warm start, and PMTK103 for cold start. According to the MediaTek PMTK command manual (2015), hot start uses stored ephemeris data, warm start uses almanac, and cold start clears all data. These commands are useful for testing acquisition times. After reset, the module outputs a boot message, and you may need to reconfigure the update rate and NMEA sentences.

Q: What are the common serial communication parameters for GPS module commands?

A: Most GPS modules default to 9600 baud, 8 data bits, no parity, and 1 stop bit (8N1). However, some modules like u-blox can be configured to higher baud rates (e.g., 115200) using UBX-CFG-PRT or PMTK251 for MediaTek. According to the u-blox 8 Receiver Description (2019), the UART interface supports baud rates up to 921600. Commands are typically ASCII for NMEA/PMTK and binary for UBX. Ensure the host's serial port matches the module's settings. After changing baud rate, you must reconfigure your host to avoid communication loss.

GPS module commands

Dialogue about

This article was published byNing Kailiang Electronics Blog, For more knowledge about“module” please followNing Kailiang Electronics Blog。

Recent Articles