Problem with gpsd

I am having a problem getting gpsd to run with Adafruit Ultimate GPS HAT for Raspberry Pi. When I us gpsmon, I get the text below instead of the display I should be expecting:

tcp://localhost:2947 JSON slave driver>
(84) {“class”:“VERSION”,“release”:“3.16”,“rev”:“3.16-4”,“proto_major”:3,“proto_m
(111) {“class”:“DEVICES”,“devices”:[{“class”:“DEVICE”,“path”:"/dev/ttyAMA0",“act
(122) {“class”:“WATCH”,“enable”:true,“json”:false,“nmea”:false,“raw”:2,“scaled”:

I have also used cgps -s and get N/A for all feedback

When I use
stty -F /dev/serial0 raw 9600 cs8 clocal -cstopb
cat /dev/serial0

The raw data is showing a healthy signal.
I am not able to find out why the gpsd is not displaying readings.
If someone can help it would be very much appreciated

cheers Ian

Hi Ian,

"gpsmon is a program that reads data directly from the serial port, but cgps is a program that read GPS positions from the GPSD service.

If your GPSD service was correctly set-up it would read the data from the serialport, and cgps would work and gpsmon would fail."

You can find the steps you need to take to read your GPS data here:

That should sort it out! Be sure to let us know either way!

Many thanks for your response Stephen, I will have a look



Thanks for the help, it looks like I thought I had restarted gpsd but with other issues I had been having I did not restart it, or it started again somehow. But after a restart

sudo killall gpsd
sudo gpsd /dev/serial0 -F /var/run/gpsd.sock

it is now working
Again thanks Stephen for pointing me in the right direction.

Still a small problem – after a reboot gpsd would not run, I then had to do the following to get it started again,

pi@raspberrypi:~ $ sudo systemctl stop gpsd.socket

pi@raspberrypi:~ $ sudo gpsd /dev/serial0 -F /var/run/gpsd.sock

can someone please suggest the best way to bring gpsd back on line at startup.

An easy way would be to install Cron, and schedule those two terminal commands at startup.

That’s how I’d do it anyway. There are probably many other ways to go about it!

Thanks Stephen,

Installed Cron and scheduled the two instructions at reboot and worked fine.

1 Like