[LinuxPPS] PPS/ntpd fails on fresh startup

Luca Bertagnolio time at berta.com
Wed Oct 15 11:57:08 CEST 2008


If I may... in the refclock_nmea.c source, I find only one single reference to
LDISC, here is the relevant part of the code:

        /*
         * Open serial port. Use CLK line discipline, if available.
         */
        (void)sprintf(device, DEVICE, unit);

        /*
         * Opening the serial port with appropriate baudrate
         * based on the value of bit 4.
         */
        if ( peer->ttl & 0x10 ) {
                fd = refclock_open(device, 2*SPEED232, LDISC_CLK);
                msyslog(LOG_NOTICE,
                                "refclock_nmea : serial port baudrate
set to 9600");
        } else {
                fd = refclock_open(device, SPEED232, LDISC_CLK);
                msyslog(LOG_NOTICE,
                                "refclock_nmea : serial port baudrate
set to 4800");
        }

Are you trying to tell me that the issues we are facing might be related to that
*one* single refclock_open call with the LDISC_CLK parameter set?

Forgive me for the dumb question...  --Luca

On Wed, Oct 15, 2008 at 11:28 AM, Cirilo Bernardo
<cirilo.bernardo at gmail.com> wrote:
> On Wed, Oct 15, 2008 at 8:24 PM, Udo van den Heuvel <udovdh at xs4all.nl> wrote:
>> Rodolfo Giometti wrote:
>>> I suppose we can propose a configuration parameter for the LDISC
>>> selection since this may be useful for LinuxPPS ldisc support too!
>>
>> Let's investigate first.
>> And only after drawing the right conclusions propose something to
>> somebody else.
>>
>
> I agree with Udo - after all, as I said it has been over a year since
> I have actually read through the NTPD code.  I am only pointing out
> possibilities to investigate based on what small amounts I remember of
> the code (which is such a small amount that you see I had to grep the
> code to make sure I did not imagine it).  However, if adding an LDISC
> parameter to NTPD config can fix the problem, this also fixes some
> major ugly hacks which we currently have to live with.
>
> - Cirilo



More information about the LinuxPPS mailing list