This is how I got mine working, which is certainly UBlox, and I think a VK-172. The systemd controlled gpsd does not seem to cooperate very well
/etc/default/gpsd:
Set start_daemon to false to deactivate this activation method.
Code: Select all
# Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
START_DAEMON="false"
# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="true"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyACM0"
GPSD_SOCKET="/var/run/gpsd.sock"
# Other options you want to pass to gpsd
GPSD_OPTIONS="-n"
Within /etc/rc.local:
The -n option is important, as this activates the daemon without needing some other GPS client to send it a query first. This might be what you need to restart the device.
Code: Select all
/bin/systemctl stop gpsd.socket
/bin/sleep 1
/usr/sbin/gpsd /dev/ttyACM0 -n -F /var/run/gpsd.sock
/bin/sleep 1
/usr/sbin/service ntp restart
Within /etc/ntp.conf
Code: Select all
# Use GPS receiver
server 127.127.28.0 prefer
fudge 127.127.28.0 time1 0.0 refid GPS
# GPS PPS reference, if provided by GPS device
server 127.127.28.1 prefer
fudge 127.127.28.1 refid PPS
The ntp.conf section came at least partly from
https://blog.logentries.com/2015/07/add ... e-to-ntpd/, but I cannot remember where I got the info about not using systemd for gpsd. I do know that the tell-tale symptoms of systemd getting it wrong is that the gpsd port was owned by the wrong process. i.e. 'sudo netstat -pant' would show that port 2947 was owned by process 1 (init) instead of by gpsd.