On Sat, May 08, 2021 at 02:57:30PM +0200, Lars Munch wrote:

> 1. Use the time provided by gpsd to ntpshm. This can be implemented without
> dependencies to gpsd.

Doesn't sound aweful, but not great either.

> 2. Use libgpsd to get the time, but that adds a dependency to gpsd

No, I won't use that library in linuxptp.  Before implementing the
current solution in nmea.c, I tried really hard to use gpsd, hoping
that it would "just work" because of the multiple different nmea and
binary protocols that it has.  That seemed like a compelling feature.
However, I couldn't get it to work with either a commodity gps or a
high end, survey quality gps.
 
> I might also be able to use gpspipe and socat to get the NMEA sentences
> from gpsd to ts2phc, but that is not very elegant.

This is best approach IMO.  You can wrap gpspipe|socat in a systemd
job to get automatic restarting and logging and so on.  If the
gpspipe|socat combination is too flaky to keep running, then writing a
little C or python program to read the UART and publish two sockets is
pretty easy.

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to