[LinuxPPS] wiki for pps stops when ntpd starts?

Udo van den Heuvel udovdh at xs4all.nl
Fri Jun 12 07:21:59 CEST 2009


Hello,

I added the patch to the wiki.
The wording can be improved a bit, I guess: 
http://wiki.enneenne.com/index.php/LinuxPPS_installation#Building_the_tools
Please comment.

Kind regards,
Udo

William S. Brasher wrote:
> On Wed, 10 Jun 2009, Rodolfo Giometti wrote:
> 
>> Ok, they are calling the same functions... so the only differences
>> should be into ioctl() FLAGS parameters. Can you check them into
>> ldattach sourc code? You may also disable the ioctl() calls and then
>> retry setting ldisc.
>>
>> Ciao,
>>
>> Rodolfo
>>
> 
> 
> OK:  ldattach does not set the flags like ntpd would them set, it seems.  
> I have no idea what this does to other users of ldattach, but it does let 
> ntpd sync to pps on my box.
> 
> The following patch to ldattach will "fix" the problem and with ppstest 
> hanging and ntpd never seeing the pps signal after ntpd is started:
> 
> 
> --- ldattach.c.org      2009-06-10 06:46:50.000000000 -0500
> +++ ldattach.c  2009-06-10 08:57:12.000000000 -0500
> @@ -237,6 +237,9 @@
>         ts.c_cflag |= (PARENB|PARODD);
>         break;
>      }
> +
> +    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);
> 
> 
> 
> 
> It took just a few minutes to sync:
> 
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> +GPS_NMEA(0)     .GPS.            0 l   11   16  377    0.000    0.001   0.002
> oPPS(0)          .PPS.            0 l   12   16  377    0.000    0.001   0.002
> 
> _______________________________________________
> LinuxPPS mailing list
> LinuxPPS at ml.enneenne.com
> http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
> Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support
> 




More information about the LinuxPPS mailing list