[LinuxPPS] 1PPS Atom Ref Clock Not being Polled?

William S. Brasher billb958 at door.net
Thu Jul 23 12:30:03 CEST 2009


On Wed, 22 Jul 2009, K. Connolly wrote:

> The patches you used sound very official... Where did you get them? Sorry if
> that's a dumb question, it's just I feel like I've been looking at hundreds of
> forum posts and links and references to various patches. I would like to
> emulate your setup exactly and see where it gets me.


The patches come from the Wiki:

http://ftp.enneenne.com/pub/misc/linuxpps/patches/tests/ntp-pps-v2.6.30-rc5-bis.diff

http://ftp.enneenne.com/pub/misc/linuxpps/refclocks/nmea/nmea.patch


The ntp patch I use includes a small change required to get ntp to compile 
against glibc-2.9 and above, since I am using glibc-2.10.1 or 
eglibc-2.10.1 right now.




> 
> On that note, could you also let me know what version of ldattach you used,
> and how (if) it was patched?
> 


I am using the ldattach from util-linux-ng-2.15.1.  I patched it with the 
attached patch that also appeared on the mailing list, but I've got to say 
I really don't know what problem it fixes or why it works, and haven't had 
the time to find out.  I'm not sure anyone else knows what is going on 
here, either.

Note that there is a new util-linux-ng-2.16 out now, but I haven't had 
time to try it, yet, either.
-------------- next part --------------
diff -Naur util-linux-ng-2.15.1.org/sys-utils/ldattach.8 util-linux-ng-2.15.1/sys-utils/ldattach.8
--- util-linux-ng-2.15.1.org/sys-utils/ldattach.8	2009-05-19 07:24:45.000000000 -0500
+++ util-linux-ng-2.15.1/sys-utils/ldattach.8	2009-06-14 10:32:48.000000000 -0500
@@ -35,7 +35,7 @@
 .B ldattach
 prints usage information.
 .SH LINE DISCIPLINES
-As of kernel release 2.6.21, the following line disciplines are supported:
+Depending on the kernel release, the following line disciplines are supported:
 .TP
 .BR TTY ( 0 )
 The default line discipline,
@@ -80,6 +80,9 @@
 .TP
 .BR GIGASET_M101 ( 16 )
 Driver for Siemens Gigaset M101 serial DECT adapter.
+.TP
+.BR PPS ( 18 )
+Driver for serial line Pulse Per Second (PPS) source.
 .SH OPTIONS
 .TP
 \fB-d\fP | \fB--debug\fP
diff -Naur util-linux-ng-2.15.1.org/sys-utils/ldattach.c util-linux-ng-2.15.1/sys-utils/ldattach.c
--- util-linux-ng-2.15.1.org/sys-utils/ldattach.c	2009-05-19 07:24:45.000000000 -0500
+++ util-linux-ng-2.15.1/sys-utils/ldattach.c	2009-06-14 10:34:33.000000000 -0500
@@ -34,6 +34,10 @@
 # define N_GIGASET_M101 16
 #endif
 
+#ifndef N_PPS
+# define N_PPS 18
+#endif
+
 #ifndef ARRAY_SIZE
 # define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 #endif
@@ -65,7 +69,8 @@
 	{ "HCI",	N_HCI },
 	{ "GIGASET_M101",	N_GIGASET_M101 },
 	{ "GIGASET",	N_GIGASET_M101 },
-	{ "M101",	N_GIGASET_M101 }
+	{ "M101",	N_GIGASET_M101 },
+	{ "PPS",	N_PPS },
 };
 
 /* look up line discipline code */
@@ -237,6 +242,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