[LinuxPPS] LinuxPPS new functionalities

William S. Brasher billb958 at door.net
Thu Feb 18 19:37:21 CET 2010


On Thu, 18 Feb 2010, clemens at dwf.com wrote:

> > On 2010-02-18 18:15, clemens at dwf.com wrote:
> > >> Can you please comment on how well this patchset works w.r.t. opening
> > >> the serial port with ppsldisc and/or ldattach and ntpd seeing pps or not?
> > >>
> > >> I.e.: does ldattach work well? (any issues?)
> > >> If not: does ppsldisc work better? (any issues?)
> > >>
> > >> Please post.
> > > I am using ppsldisc, and am having no problems at all on 4machines 32/64bit.
> > > As such, Ive had no reason to try ldattach.
> > 
> > In the past some people here noticed issues that pps would stop and/or
> > that ldattach would not work well enough.
> > ppsldisc is depreciated and ldattach is the preferred tool.
> > I'd gladly use it if it would work 100%. (there was a bug that I can not
> > put my finger on, ldattach just opens the serial port with the right
> > line discipline and yet it differs from ppsldisc in behaviour)
> > 
> One reason for my not using ldattach, is not knowing where to find it.
> Im sure I could scan all of last year's postings on this list,- but have never 
> been
> that interested.
> 
> What we REALLY need is to put both ppsldisc.c and ldattach.c in the 'tools'
> directory on http://ftp.enneenne.com/pub/misc/linuxpps/, and then start
> a new directory there called include with all of the *.h files: timepps.h, 
> pps.h,
> and either a patches timex.h or a comment on how to patch your own.
> 
> Seems like it would require a small effort, and have a big payoff.
> 



I am using ldattach which comes from util-linux-ng, and it is working well 
for me.  I do patch ldattach so that ntpd will start reliably when I boot 
the machine; otherwise I have to first start ntpd, kill it, start ldattach 
and finally start ntpd.  The patch to ldattach I use is:


--- util-linux-ng-2.17.org/sys-utils/ldattach.c 2009-12-01 03:31:53.000000000 -0600
+++ util-linux-ng-2.17/sys-utils/ldattach.c     2010-01-09 16:09:51.000000000 -0600
@@ -239,6 +239,10 @@
        ts.c_cflag |= (PARENB|PARODD);
        break;
     }
+
+    if (ldisc == 18)
+        ts.c_iflag |= (IGNBRK|ICRNL);
+
     ts.c_cflag |= CREAD;       /* just to be on the safe side */
     if (tcsetattr(tty_fd, TCSAFLUSH, &ts) < 0)
        err(EXIT_FAILURE, _("cannot set terminal attributes for %s"), dev);





More information about the LinuxPPS mailing list