I've been struggling for awhile to setup GPS on my Raspberry Pi. I have a Hemisphere Vector H102 connected through a serial connection via USB through an adapter.
I've followed this guide which seems straight-forward and fool proof.
The issue, in short, is when I run:
sudo killall gpsd
sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
cgps
The error message displayed is:
cgps: GPS timeout
I have absolutely no idea what the issue could be. First, I thought it could be an issue with the GPS. These devices are relatively fragile, so I figured a component of it could be damaged. I plugged the device into my computer while sitting outside and it got a position, differential, and heading lock.
Once I knew it had a lock, I plugged it back into the Pi, reran everything, yet I still recieved the error message.
I know the device can be detected. Running lsusb
, shows the following entry:
Bus 001 Device 010: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Also running ls /dev/ttyAMA*
correctly shows:
/dev/ttyAMA0
Then, I thought it could be a problem with how the Raspberry Pi is configured. I doubled checked the aforementioned guide.
Conveniently, I have another GPS, although this one is a much smaller and cheaper that plugs directly into USB and doesn't require it's own power source. Rerunning all the commands replacing /dev/ttyAMA0
with /dev/ttyUSB0
worked. A lock was achieved relatively quickly and cgps
displayed the correct data.
Even when the lock wasn't achieved right away on the USB GPS, cgps
didn't time out. Does that mean the problem is a connection issue?
Just to double check that it wasn't an issue with GPSD, I called variations of the command, changing the location specified, and even omitting the location. (Always making sure to kill
a GPSD process before starting a new one.) Sometimes, the model of the GPS would flash up as raw data, but cgps
always timed out.
sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock
sudo gpsd -F /var/run/gpsd.sock
I have no idea what to do. Any help would be greatly appreciated!
Update:
I suppose it's also important to mention that I had a lock using this GPS the other day. Now it doesn't get a lock at all, which to me makes no sense.
NO FIX
means it simply didn't get a lock - is that correct?