Setting up gpsd on a Raspberry Pi
Equipment
- Raspberry Pi
- Adafruit Ultimate GPS with USB - 66 channel w/10 Hz updates
- USB micro-b to micro-b OTG cable
Setting up the Raspberry Pi
- Install Raspbian using the relevant instructions
- plug everything in
Configuring Raspbian
Install gpsd
sudo apt install gpsd
Edit /etc/defaults/gpsd and set the DEVICES variable to
/dev/ttyUSB0
DEVICES="/dev/ttyUSB0"
Restart gpsd
sudo systemctl restart gpsd
Now you can run cgps to see your gps coordinates. Gpsd listens on
localhost:2947. The
gpsd_json documentation
details how interact with the gpsd process.
I also wrote a simple python client
to get gps data from gpsd.