I am following this tutorial to hook up Adafruit's Ultimate GPS Breakout to my Raspberry Pi 2. I have carefully read each step.
When I run gpsmon /dev/ttyUSB0
, it displays expected output with my location, speed, etc. When I run cgps -s
, however, I get this message cgps: no gpsd running or network error: -4, can't create socket
.
The really weird thing is that the GPSD seems to be failing. Here is me trying to start it:
pi@raspberrypi:~$ sudo service gpsd status
[FAIL] gpsd is not running ... failed!
pi@raspberrypi:~$ sudo service gpsd restart
[ ok ] Restarting GPS (Global Positioning System) daemon: gpsd.
pi@raspberrypi:~$ sudo service gpsd status
[FAIL] gpsd is not running ... failed!
pi@raspberrypi:~$ sudo service gpsd start
pi@raspberrypi:~$ sudo service gpsd status
[FAIL] gpsd is not running ... failed!
So, it is apparent that cgps
is failing because GPSD is not starter. Any suggestions to get GPSD working?
EDIT
When I run sudo gpsd -N -D3 -F /var/run/gpsd.sock
, I get this output:
gpsd:INFO: launching (Version 3.6)
gpsd:ERROR: can't bind to IPv4 port gpsd, Cannot assign requested address
gpsd:ERROR: can't create IPv6 socket
gpsd:DATA: command sockets creation failed, netlib errors -1, -1
Late answer. However I just bumped into this problem and found that my
/etc/network/interfaces
didn't exist. Thusly there was noloopback
interface present. Ifinterfaces
doesn't exist, try creating it by runningsudo nano /etc/network/interfaces
and add:(Or as it suits your setup.)
Then run
ifup -a
and check if there's a new interface by runningifconfig
. It should be somewhat like:Hope it works for others as well.