Check out the new projects site for A-i-S

Sunday, March 13, 2016

Raspbery Pi GPS

Adding GPS location data to a Raspberry PI project is fairly easy.

The most common way is to add a GPS module that outputs text data on a serial port.

Below is a GPS module purchased on eBay that includes a Neo-6 GPS module, a Raspberry Pi specific PCB and a GPS antenna (not seen in the photo).

As soon as this module is powered up it attempts to send data over the UART pins.

The following advice is based on the Raspberry Pi running a Debian Jessie operating system.

Useful commands:

Freeing up the UART pins from being used for system messages:

Open /boot/cmdline.txt and remove


Stopping the serial service, freeing up the port for GPS usage:

sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service


Installing gps daemon and related software:

sudo apt-get install gpsd gpsd-clients python-gps

Under Raspbian Jessie you can start it as a serivce (preferred method):

sudo service gpsd start

To make sure gpsd is not already running then making sure no sockets have been left behind from previous usages:

sudo killall gpsd
sudo rm /var/run/gpsd.sock

Useful links:

No comments: