GPS_edited.jpg

GPS Configuration

GPS Introduction

The GPS can be configured to use the Raspberry Pi serial port or the I2C interface. Using jumpers J9 and J10 in position 1-2, the GPS is configured for serial. Moving the jumpers to 2-3 configures the GPS to use the I2C interface. Linux can be configured to utilize the GPS data in the gpsd daemon.

Step 1 - Install GPSD

pi@raspberrypi ~ $ sudo apt-get update
pi@raspberrypi ~ $ sudo apt-get upgrade
pi@raspberrypi ~ $ sudo reboot

Step 2 - Turn off Raspberry Pi Serial Console

pi@raspberrypi ~ $ sudo raspi-config

Select "Interface Options"

Select "Serial"

Select "No" for the login shell to accessible over serial

Select "Yes" for the serial port hardware to be enabled

Step 3 - Test GPS NMEA sentences

We can now test that the Raspberry Pi see the NMEA sentences from the GPS device

pi@raspberrypi ~ $ cat /dev/serial0

The screen should fill with NMEA sentences, similar too

$GPGGA,181908.00,3404.7041778,N,07044.3966270,W,4,13,1.00,495.144,M,29.200,M,0.10,0000*40

Step 4 - Install and test with gps tools

pi@raspberrypi ~ $ sudo apt-get install gpsd-clients gpsd -y

pi@raspberrypi ~ $ sudo nano /etc/default/gpsd

Make sure the file has the following entry

DEVICES="/dev/serial0"

Save the file and reboot

Use gpsmon to view the data from the GPS

pi@raspberrypi ~ $ gpsmon