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.

🛒

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 PirateGPS ModuleDescription
VoutVCC3.3 volt power supply
IO4/TXRXTransmit from Bus Pirate to GPS receive
IO5/RXTXTransmit from GPS to Bus Pirate receive
GNDGNDGround

The connections can be made with the Bus Pirate cable, clips, or “dupont” style jumpers.

See it in action

Mode setup

Bus Pirate [/dev/ttyS0]
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 uart to change to UART mode. If current data format is not 9600/8/n/1:
  • ’n’ to change communications parameters
  • 9600 to select 9600 baud
  • 8 to select 8 data bits
  • 1 to select None parity
  • 1 to select 1 stop bit
  • 1 to select None hardware flow control
  • 1 to select Non-inverted signal levels

Power supply setup

Bus Pirate [/dev/ttyS0]
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.3 to 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

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.

GPS command

Bus Pirate [/dev/ttyS0]
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*35

NMEA 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.

MessageDescription
$GPGGATime, position, and fix type data
$GPGLLLatitude, longitude, UTC time of position fix and status
$GPGSAGPS receiver mode, satellites used, DOP values
$GPGSVNumber of satellites in view, satellite ID, elevation, azimuth, and SNR
$GPRMCTime, date, position, course, and speed data
$GPVTGCourse and speed relative to ground

Partial list of NMEA sentences. Format and example of each message is given below.

$GPGGA

$GPGGA,141458.00,4300.16985,N,08754.25421,W,1,06,1.38,190.7,M,-34.1,M,,*61

Example GGA message from capture above.

NameValueDescription
Message ID$GPGGAGGA header
UTC Time141458.00UTC time in hhmmss.ss format; 2:14:58.00 pm
Latitude4300.16985Latitude in the format of ddmm.mmmmm; 43° 00.16985'
N/S IndicatorNN=north, S=South
Longitude08754.25421Longitude in the format of ddmm.mmmmm; 87° 54.25421'
E/W IndicatorWE=east, W=west
Position Fix Indicator10=fix not valid, 1=GPS SPS mode fix value, 2=Differential GPS SPS mode fix valid
Satellites used06range 0 to 12 satellites
HDOP1.38Horizontal dilution of precision
MSL altitude190.7Altitude above sea level (units below)
UnitsMunits for MSL measurement; meters
Geoid separations-34.1Geoid-to-ellipsoid separation
UnitsMunits for Geoid separation measurement; meters
Age of differential correction(NULL)Differential GPS correction in seconds
Differential station ID(NULL}Station ID
Checksum0x61checksum 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*7C

Example GLL message from capture above.

NameValueDescription
Message ID$GPGLLGLL header
Latitude4300.16985Latitude in the format of ddmm.mmmmm; 43° 00.16985'
N/S IndicatorNN=north, S=South
Longitude08754.25421Longitude in the format of ddmm.mmmmm; 87° 54.25421'
E/W IndicatorWE=east, W=west
UTC Time141458.00UTC time in hhmmss.ss format; 2:14:58.00 pm
StatusAA=data valid, V=data not valid
ModeAA=autonomous, D=DGPS, E=DR
Checksum0x7Cchecksum 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*07

Example GGSA message from capture above.

NameValueDescription
Message ID$GPGSAGSA header
Mode 1AA=automatic (auto switch between 2D/3D), M=manual (forced to 2D or 3D)
Mode 231=fix not available, 2=2D( < 4 satellites), 3=3D( > 3 satellites)
Satellite used23Satellite ID on channel 1
Satellite used10Satellite ID on channel 2
Satellite used24Satellite ID on channel 3
Satellite used32Satellite ID on channel 4
Satellite used18Satellite ID on channel 5
Satellite used15Satellite ID on channel 6
Satellite used(several NULLS)Satellite ID on channel 7-12
PDOP2.62Position dilution of precision
HDOP1.38Horizontal dilution of precision
VDOP2.23Vertical dilution of precision
Checksum0x07checksum 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*71

Example GGSV message from capture above.

NameValueDescription
Message ID$GPGSVGSV header
Number of messages3total number of $GPGSV messages for this fix
Message number1this message of total; 1 of 3
Satellites in view9Total number of satellites
Satellite ID02ID of channel 1 satellite
Elevation03Elevation [degrees] of channel 1 satellite
Azimuth324Azimuth [degrees] of channel 1 satellite
SNR(NULL)Signal-to-noise ratio [dBHz] of channel 1 satellite
Satellite ID08ID of channel 2 satellite
Elevation13Elevation [degrees] of channel 2 satellite
Azimuth301Azimuth [degrees] of channel 2 satellite
SNR14Signal-to-noise ratio [dBHz] of channel 2 satellite
Satellite ID10ID of channel 3 satellite
Elevation58Elevation [degrees] of channel 3 satellite
Azimuth314Azimuth [degrees] of channel 3 satellite
SNR24Signal-to-noise ratio [dBHz] of channel 3 satellite
Satellite ID15ID of channel 4 satellite
Elevation17Elevation [degrees] of channel 4 satellite
Azimuth062Azimuth [degrees] of channel 4 satellite
SNR22Signal-to-noise ratio [dBHz] of channel 4 satellite
Checksum0x71checksum 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*6B

Example RMC message from capture above.

NameValueDescription
Message ID$GPRMCRMC header
UTC Time141458.00UTC time in hhmmss.ss format; 2:14:58.00 pm
StatusAA=data valid, V=data not valid
Latitude4300.16985Latitude in the format of ddmm.mmmmm; 43° 00.16985'
N/S IndicatorNN=north, S=South
Longitude08754.25421Longitude in the format of ddmm.mmmmm; 87° 54.25421'
E/W IndicatorWE=east, W=west
Speed over ground1.481speed of movement in knots
Course over ground(NULL)course in degrees
Date151025Date in ddmmyy; October 15th, 2025
Magnetic variation(NULL)degrees of variation
E/W Indicator(NULL)E=east, W=west
ModeAA=autonomous, D=DGPS, E=DR
Checksum0x6bchecksum 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.481000

$GPVTG

$GPVTG,,T,,M,1.481,N,2.744,K,A*2A

Example VTG message from capture above.

NameValueDescription
Message ID$GPVTGVTG header
Course(NULL)degrees measured heading
ReferenceTTrue north
Course(NULL)degrees measured heading
ReferenceMMagnetic north
Speed1.481Measured horizontal speed in knots
UnitsNKnots
Speed2.744Measured horizontal speed in k/h
UnitsKKilometers per hour
ModeAA=autonomous, D=DGPS, E=DR
Checksum0x2achecksum 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.744000

Open 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.