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
"console=ttyAMA0,115200"
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
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:
https://www.u-blox.com/sites/default/files/products/documents/NEO-6_DataSheet_%28GPS.G6-HW-09005%29.pdfhttps://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/pi-setup
Comments