[time-nuts] OpenBSD / ntpd / gpsd / PPS problems

Chris Kuethe chris.kuethe at gmail.com
Sun Oct 25 04:41:51 UTC 2009


Hmf. Try this patch to ldattach

Index: ldattach.c
===================================================================
RCS file: /cvs/src/sbin/ldattach/ldattach.c,v
retrieving revision 1.12
diff -N -u -p ldattach.c
--- ldattach.c	6 May 2009 18:21:23 -0000	1.12
+++ ldattach.c	25 Oct 2009 04:40:56 -0000
@@ -99,9 +99,12 @@ relay(int device, int pty)
 				exit(1);
 			}
 			if (nread == 0) {
+#if 0
 				syslog(LOG_ERR, "eof during read from %s: %m",
 				     n ? "pty" : "device");
 				exit(1);
+#endif
+				usleep(10000);
 			}
 			atomicio(vwrite, pfd[1 - n].fd, buf, nread);
 		}

On Sat, Oct 24, 2009 at 9:34 PM, Rich Wales <richw at richw.org> wrote:
> Chris Kuethe wrote:
>
>> I removed the special-casing that would cause gpsd to activate the nmea(4)
>> line discipline. The way I'm now doing this is to get ldattach to relay
>> through a pty, and gpsd can read that pty.  you can do something like this
>> in /etc/rc.local:       gpsd -n $(ldattach -t dcd nmea cua01)
>
> I assume you also used the "-p" flag to ldattach, right?
>
> I tried the following:
>
>        gpsd -n `ldattach -p -s 19200 -t dcd nmea /dev/tty00`
>
> (my GPS is on /dev/tty00)
>
> -- but about one second after ldattach did its setup, it died with the
> following error in the logs:
>
>        eof during read from device: Undefined error: 0
>
> and cgps never shows any data from the GPS.
>
> Rich Wales
> richw at richw.org
>
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
>



-- 
GDB has a 'break' feature; why doesn't it have 'fix' too?



More information about the time-nuts mailing list