gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] Best way to avoid systemd woes for NTP?


From: Greg Troxel
Subject: [gpsd-dev] Best way to avoid systemd woes for NTP?
Date: Sun, 05 May 2019 11:28:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix)

I am trying to help a distribution maintainer (of an Ubuntu remix) set
things up so that

  - install distribution
  - boot
  - plug in USB GPS mouse

will lead to gpsd being used as a stratum 5 server with an assumed
offset of 80ms, in support of having time to within 100ms while off the
grid.  I thus have a few questions, mostly systemd and the recommended
avoidance path.

0) Obviously ntpd needs a server line for the shm refclock.  That's
clear and in the HOWTO.  (Hence not a question.)

1) It seems systemd does not invoke gpsd with -n, and I'm guessing I can
change a config file to add this.  Can anyone report success with this?

The troubleshooting page
  http://catb.org/gpsd/troubleshooting.html
gives an example of how to have systemd start gpsd at boot rather than
on a connection, but the example does not pass -n.

2) The example gives a chrony line for sequencing, but not ntpd.  The
ham remix at least uses ntpd, so it seems both should be present.  Is
this a correct conclusion?

3) The example in the troubleshooting page does not pass a tty pathname,
so I'm guessing that the udev/hotplug scripts are separate from the
systemd part, and arrange to call gpsdctl to add the tty on insert.

Is this known/expected to work on Ubuntu?

4) Does the -n flag for the global gpsd become effective on individual
serial ports added with gpsdctl?  If gpsd is started with no devices,
and hotplug does gpsdctl add, does gpsd start running on the new device?

5) I don't follow how the default setup works, in that the hotplug
script should run on insert, and then gpsd only started when someone
starts a client.  So with the following sequence:

  1) boot
  2) systemd starts listening on 2947, no gpsd
  3) USB GPS mouse inserted
  4) user runs xgps
  5) systemd receives connection, starts up gpsd

I don't see how the gpsdctl from step 3 works, because when gpsdctl
starts gpsd, it will fail because systemd is listening on 2947.   Is
this broken, or what did I get wrong above?

6) If the recommendation is to totally avoid systemd for gpsd, what
should I do instead?  (Keep in mind that my goal is reliable operation
with minimal changes.)  Should whatever that is be explained in the
troubleshooting guide?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]