NMEA GPS module UART
GNSS is a system of global navigation using signals from satellite constellations such as GPS (USA), GALILEO (EU), BeiDuo (China), and GLONASS (Russia). There are also some smaller regional GNSS constellations covering only Japan (QZSS) and India (IRNSS). While technically the system is called GNSS, it’s more commonly referred to as GPS, after the original and most widely known system.
Depending on your GPS module age and type, it may track only one satellite constellation, a few or all of them. GPS modules generally output position data over a TTL serial UART. Some modules also accept configuration commands over the same UART, but they vary widely by manufacturer and model.
GPS devices use a protocol called NMEA, consisting of ASCII “sentences” (messages). The Bus Pirate can decode these sentences and can be used to test or explore a GPS module.
Get Bus Pirate & Accessories
Connections
GPS modules usually have at least 4 connections: VCC, GND, TX, and RX. The actual location and order of these connections can vary from module to module and should be verified by the datasheet or silkscreen labels on the board. The GPS module may have additional signals, but only the 4 listed above are needed.

| Bus Pirate | GPS Module | Description |
|---|---|---|
| Vout | VCC | 3.3 volt power supply |
| IO4/TX | RX | Transmit from Bus Pirate to GPS receive |
| IO5/RX | TX | Transmit from GPS to Bus Pirate receive |
| GND | GND | Ground |
The connections can be made with the Bus Pirate cable, clips, or “dupont” style jumpers.

See it in action
Mode setup
HiZ> m uart Mode: UART Use previous settings? UART speed: 115200 baud Data bits: 8 Parity: None Stop bits: 1 Hardware flow control: None Signal inversion: Non-inverted (Standard) y/n, x to exit (Y) > n UART speed 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 etc x. Exit Baud (115200*) > 9600 Data bits 5 to 8 bits x. Exit Bits (8*) > 8 Parity 1. None* 2. Even 3. Odd x. Exit Parity (1) > 1 Stop bits 1. 1* 2. 2 x. Exit Bits (1) > 1 Hardware flow control 1. None* 2. RTS/CTS x. Exit Flow control (1) > 1 Signal inversion 1. Non-inverted (Standard)* 2. Inverted x. Exit Invert signals (1) > 1 Actual speed: 9600 baud UART>
Communications to GPS modules are TTL serial, so start by setting the Bus Pirate mode to UART. The data format for most of these modules is 9600 buad, 8 bits, no parity, and one stop bit. Set as appropriate.
m uartto change to UART mode. If current data format is not 9600/8/n/1:- ’n’ to change communications parameters
9600to select 9600 baud8to select 8 data bits1to select None parity1to select 1 stop bit1to select None hardware flow control1to select Non-inverted signal levels
9600 baud has been by far the most common default speed for GPS modules, but some newer modules may default to higher speeds such as 38400, 115200 or 460800 baud. If you see garbled data when you start the gps command, try changing the baud rate to match your module’s default.
Power supply setup
UART> W 3.3 3.30V requested, closest value: 3.30V 300.0mA requested, closest value: 300.0mA Power supply:Enabled Vreg output: 3.3V, Vref/Vout pin: 3.3V, Current: 20.3mA UART>
Most GPS modules operate at 3.3Volts, but check the datasheet to be sure.
W 3.3to turn on the Bus Pirate’s power supply and set to 3.3 volts. Current limit will be set to the default 300 milliamp current limit.
The power supply voltage and actual output current will be displayed
Verify actual voltage requirements to your GPS module and replace the 3.3 with the appropriate value!
Raw NMEA output
UART> { UART OPEN (ASYNC READ) UART> '$' 0x24'G' 0x47'N' 0x4E'G' 0x47'G' 0x47'A' 0x41',' 0x2C',' 0x2C',' 0x2C',' 0x2C',' 0x2C',' 0x2C'0' 0x30',' 0x2C'0' 0x30'0' 0x30',' 0x2C'2' 0x32'5' 0x35'.' 0x2E'5' 0x35',' 0x2C',' 0x2C',' 0x2C',' 0x2C',' 0x2C',' 0x2C'*' } UART CLOSE UART>
The { command opens the UART and NMEA sentences should begin to stream in. The ASCII character are shown next to their HEX values. The } command closes the UART.
Bridge command
UART> bridge UART bridge. Press Bus Pirate button to exit. $GPGSV,1,1,00*79 $BDGSV,1,1,00*68 $GNRMC,,V,,,,,,,,,,M*4E $GNVTG,,,,,,,,,M*2D $GNZDA,,,,,,*56 $GPTXT,01,01,01,ANTENNA OK*35
The Bus Pirate can also become a simple USB to serial converter using the bridge command. Data from the GPS will display in plain text. Press the Bus Pirate button to exit the bridge command.
Bridge can be used to connect a GPS module to a PC application like PyGPSClient and GnssToolKit3 for more advanced analysis. Close the Bus Pirate terminal first, then connect the software to the same serial port used by the terminal.
GPS command
UART> gps Press any key to exit $GPTXT,01,01,02,u-blox ag - ww $GPRMC,141458.00,A,4300.16985,N,08754.25421,W,1.481,,151025,,,A*6B $xxRMC: raw coordinates and speed: (430016985/100000,-875425421/100000) 1481/1000 $xxRMC fixed-point coordinates and speed scaled to three decimal places: (4300170,-8754254) 1481 $xxRMC floating point degree coordinates and speed: (43.002831,-87.904236) 1.481000 $GPVTG,,T,,M,1.481,N,2.744,K,A*2A $xxVTG: true track degrees = nan magnetic track degrees = nan speed knots = 1.481000 speed kph = 2.744000 $GPGGA,141458.00,4300.16985,N,08754.25421,W,1,06,1.38,190.7,M,-34.1,M,,*61 $xxGGA: fix quality: 1 $GPGSA,A,3,23,10,24,32,18,15,,,,,,,2.62,1.38,2.23*07 $GPGSV,3,1,09,02,03,324,,08,13,301,14,10,58,314,24,15,17,062,22*71 $xxGSV: message 1 of 3 $xxGSV: satellites in view: 9 $xxGSV: sat nr 2, elevation: 3, azimuth: 324, snr: 0 dbm $xxGSV: sat nr 8, elevation: 13, azimuth: 301, snr: 14 dbm $xxGSV: sat nr 10, elevation: 58, azimuth: 314, snr: 24 dbm $xxGSV: sat nr 15, elevation: 17, azimuth: 62, snr: 22 dbm $GPGSV,3,2,09,18,39,167,30,23,67,071,19,24,48,076,13,27,18,269,23*76 $xxGSV: message 2 of 3 $xxGSV: satellites in view: 9 $xxGSV: sat nr 18, elevation: 39, azimuth: 167, snr: 30 dbm $xxGSV: sat nr 23, elevation: 67, azimuth: 71, snr: 19 dbm $xxGSV: sat nr 24, elevation: 48, azimuth: 76, snr: 13 dbm $xxGSV: sat nr 27, elevation: 18, azimuth: 269, snr: 23 dbm $GPGSV,3,3,09,32,42,245,14*41 $xxGSV: message 3 of 3 $xxGSV: satellites in view: 9 $xxGSV: sat nr 32, elevation: 42, azimuth: 245, snr: 14 dbm $xxGSV: sat nr 0, elevation: 0, azimuth: 0, snr: 0 dbm $xxGSV: sat nr 0, elevation: 0, azimuth: 0, snr: 0 dbm $xxGSV: sat nr 0, elevation: 0, azimuth: 0, snr: 0 dbm $GPGLL,4300.16985,N,08754.25421,W,141458.00,A,A*7C UART>
The gps command will set the UART to begin receiving sentences from the GPS module. The Bus Pirate will show the raw sentences and attempt to decode them.
Press any key to exit the gps command and return to the UART prompt.
NMEA sentence definitions
$GPTXT,01,01,01,ANTENNA OK*35NMEA sentences begin with a $ dollar sign, have one or more comma-delimited fields, and end with an optional checksum and \r\n return/newline combination.
| Message | Description |
|---|---|
| $GPGGA | Time, position, and fix type data |
| $GPGLL | Latitude, longitude, UTC time of position fix and status |
| $GPGSA | GPS receiver mode, satellites used, DOP values |
| $GPGSV | Number of satellites in view, satellite ID, elevation, azimuth, and SNR |
| $GPRMC | Time, date, position, course, and speed data |
| $GPVTG | Course and speed relative to ground |
Partial list of NMEA sentences. Format and example of each message is given below.
There is repetition of data in the various sentences, many GPS modules can be configured to only transmit the desired sentences. This is not intended to be a full primer on NMEA, but to define common sentences and how the Bus Pirate’s gps command decodes them.
$GPGGA
$GPGGA,141458.00,4300.16985,N,08754.25421,W,1,06,1.38,190.7,M,-34.1,M,,*61Example GGA message from capture above.
| Name | Value | Description |
|---|---|---|
| Message ID | $GPGGA | GGA header |
| UTC Time | 141458.00 | UTC time in hhmmss.ss format; 2:14:58.00 pm |
| Latitude | 4300.16985 | Latitude in the format of ddmm.mmmmm; 43° 00.16985' |
| N/S Indicator | N | N=north, S=South |
| Longitude | 08754.25421 | Longitude in the format of ddmm.mmmmm; 87° 54.25421' |
| E/W Indicator | W | E=east, W=west |
| Position Fix Indicator | 1 | 0=fix not valid, 1=GPS SPS mode fix value, 2=Differential GPS SPS mode fix valid |
| Satellites used | 06 | range 0 to 12 satellites |
| HDOP | 1.38 | Horizontal dilution of precision |
| MSL altitude | 190.7 | Altitude above sea level (units below) |
| Units | M | units for MSL measurement; meters |
| Geoid separations | -34.1 | Geoid-to-ellipsoid separation |
| Units | M | units for Geoid separation measurement; meters |
| Age of differential correction | (NULL) | Differential GPS correction in seconds |
| Differential station ID | (NULL} | Station ID |
| Checksum | 0x61 | checksum is the XOR of lower 7-bits of characters between $ and * |
<CR><LF> | End of message terminator |
The Bus Pirate’s gps command decodes this to display the fix quality:
$xxGGA: fix quality: 1$GPGLL
$GPGLL,4300.16985,N,08754.25421,W,141458.00,A,A*7CExample GLL message from capture above.
| Name | Value | Description |
|---|---|---|
| Message ID | $GPGLL | GLL header |
| Latitude | 4300.16985 | Latitude in the format of ddmm.mmmmm; 43° 00.16985' |
| N/S Indicator | N | N=north, S=South |
| Longitude | 08754.25421 | Longitude in the format of ddmm.mmmmm; 87° 54.25421' |
| E/W Indicator | W | E=east, W=west |
| UTC Time | 141458.00 | UTC time in hhmmss.ss format; 2:14:58.00 pm |
| Status | A | A=data valid, V=data not valid |
| Mode | A | A=autonomous, D=DGPS, E=DR |
| Checksum | 0x7C | checksum is the XOR of lower 7-bits of characters between $ and * |
<CR><LF> | End of message terminator |
The Bus Pirate’s gps command does not decode this message
$GPGSA
$GPGSA,A,3,23,10,24,32,18,15,,,,,,,2.62,1.38,2.23*07Example GGSA message from capture above.
| Name | Value | Description |
|---|---|---|
| Message ID | $GPGSA | GSA header |
| Mode 1 | A | A=automatic (auto switch between 2D/3D), M=manual (forced to 2D or 3D) |
| Mode 2 | 3 | 1=fix not available, 2=2D( < 4 satellites), 3=3D( > 3 satellites) |
| Satellite used | 23 | Satellite ID on channel 1 |
| Satellite used | 10 | Satellite ID on channel 2 |
| Satellite used | 24 | Satellite ID on channel 3 |
| Satellite used | 32 | Satellite ID on channel 4 |
| Satellite used | 18 | Satellite ID on channel 5 |
| Satellite used | 15 | Satellite ID on channel 6 |
| Satellite used | (several NULLS) | Satellite ID on channel 7-12 |
| PDOP | 2.62 | Position dilution of precision |
| HDOP | 1.38 | Horizontal dilution of precision |
| VDOP | 2.23 | Vertical dilution of precision |
| Checksum | 0x07 | checksum is the XOR of lower 7-bits of characters between $ and * |
<CR><LF> | End of message terminator |
The Bus Pirate’s gps command does not decode this message
$GPGSV
$GPGSV,3,1,09,02,03,324,,08,13,301,14,10,58,314,24,15,17,062,22*71Example GGSV message from capture above.
| Name | Value | Description |
|---|---|---|
| Message ID | $GPGSV | GSV header |
| Number of messages | 3 | total number of $GPGSV messages for this fix |
| Message number | 1 | this message of total; 1 of 3 |
| Satellites in view | 9 | Total number of satellites |
| Satellite ID | 02 | ID of channel 1 satellite |
| Elevation | 03 | Elevation [degrees] of channel 1 satellite |
| Azimuth | 324 | Azimuth [degrees] of channel 1 satellite |
| SNR | (NULL) | Signal-to-noise ratio [dBHz] of channel 1 satellite |
| Satellite ID | 08 | ID of channel 2 satellite |
| Elevation | 13 | Elevation [degrees] of channel 2 satellite |
| Azimuth | 301 | Azimuth [degrees] of channel 2 satellite |
| SNR | 14 | Signal-to-noise ratio [dBHz] of channel 2 satellite |
| Satellite ID | 10 | ID of channel 3 satellite |
| Elevation | 58 | Elevation [degrees] of channel 3 satellite |
| Azimuth | 314 | Azimuth [degrees] of channel 3 satellite |
| SNR | 24 | Signal-to-noise ratio [dBHz] of channel 3 satellite |
| Satellite ID | 15 | ID of channel 4 satellite |
| Elevation | 17 | Elevation [degrees] of channel 4 satellite |
| Azimuth | 062 | Azimuth [degrees] of channel 4 satellite |
| SNR | 22 | Signal-to-noise ratio [dBHz] of channel 4 satellite |
| Checksum | 0x71 | checksum is the XOR of lower 7-bits of characters between $ and * |
<CR><LF> | End of message terminator |
The Bus Pirate’s gps command decodes this to display the satellite info:
$xxGSV: message 1 of 3
$xxGSV: satellites in view: 9
$xxGSV: sat nr 2, elevation: 3, azimuth: 324, snr: 0 dbm
$xxGSV: sat nr 8, elevation: 13, azimuth: 301, snr: 14 dbm
$xxGSV: sat nr 10, elevation: 58, azimuth: 314, snr: 24 dbm
$xxGSV: sat nr 15, elevation: 17, azimuth: 62, snr: 22 dbm$GPRMC
$GPRMC,141458.00,A,4300.16985,N,08754.25421,W,1.481,,151025,,,A*6BExample RMC message from capture above.
| Name | Value | Description |
|---|---|---|
| Message ID | $GPRMC | RMC header |
| UTC Time | 141458.00 | UTC time in hhmmss.ss format; 2:14:58.00 pm |
| Status | A | A=data valid, V=data not valid |
| Latitude | 4300.16985 | Latitude in the format of ddmm.mmmmm; 43° 00.16985' |
| N/S Indicator | N | N=north, S=South |
| Longitude | 08754.25421 | Longitude in the format of ddmm.mmmmm; 87° 54.25421' |
| E/W Indicator | W | E=east, W=west |
| Speed over ground | 1.481 | speed of movement in knots |
| Course over ground | (NULL) | course in degrees |
| Date | 151025 | Date in ddmmyy; October 15th, 2025 |
| Magnetic variation | (NULL) | degrees of variation |
| E/W Indicator | (NULL) | E=east, W=west |
| Mode | A | A=autonomous, D=DGPS, E=DR |
| Checksum | 0x6b | checksum is the XOR of lower 7-bits of characters between $ and * |
<CR><LF> | End of message terminator |
The Bus Pirate’s gps command decodes this to:
$xxRMC: raw coordinates and speed: (430016985/100000,-875425421/100000) 1481/1000
$xxRMC fixed-point coordinates and speed scaled to three decimal places: (4300170,-8754254) 1481
$xxRMC floating point degree coordinates and speed: (43.002831,-87.904236) 1.481000Note - GPS module was stationary when this reading was taken.
$GPVTG
$GPVTG,,T,,M,1.481,N,2.744,K,A*2AExample VTG message from capture above.
| Name | Value | Description |
|---|---|---|
| Message ID | $GPVTG | VTG header |
| Course | (NULL) | degrees measured heading |
| Reference | T | True north |
| Course | (NULL) | degrees measured heading |
| Reference | M | Magnetic north |
| Speed | 1.481 | Measured horizontal speed in knots |
| Units | N | Knots |
| Speed | 2.744 | Measured horizontal speed in k/h |
| Units | K | Kilometers per hour |
| Mode | A | A=autonomous, D=DGPS, E=DR |
| Checksum | 0x2a | checksum is the XOR of lower 7-bits of characters between $ and * |
<CR><LF> | End of message terminator |
The Bus Pirate’s gps command decodes this to:
$xxVTG: true track degrees = nan
magnetic track degrees = nan
speed knots = 1.481000
speed kph = 2.744000Open street map usage
The longitude/latitude data can be used to locate the GPS fix in Open Street Maps by pasting the values into the search box in the upper left. Southern latitudes and western longitudes should be entered as negative values:

The map for the coordinates (43.002813, -87.904311) in the samples above:

GPS resources
- PyGPSClient - open source GPS client with a graphical interface. Can display NMEA sentences, parse GPS data, and plot position on a map.
- GnssToolKit3 - open source GPS data viewer and analyzer with a graphical interface. Can display NMEA sentences, parse GPS data, and plot satellite position on a map.
- GPSd - open source GPS daemon with a large list of supported GPS modules and their NMEA sentences. Good reference for manufacturer specific module configuration.