[LinuxPPS] ntp 'bugs'

Rodolfo Giometti giometti at enneenne.com
Sun Jun 29 13:53:52 CEST 2008


On Sun, Jun 29, 2008 at 01:22:40PM +0200, Udo van den Heuvel wrote:

> >>From here...
> >   
> >> +		/* no /dev/gpspps0, retry /dev/gps0 because of ldisc principle */
> >> +		(void) sprintf(device, DEVICE, unit);
> >> +		msyslog(LOG_ERR, "refclock_nmea: retry \"%s\" for PPS", device);
> >> +		if (time_pps_create(pp->io.fd, &up->handle) == 0) {
> >> +			msyslog(LOG_INFO, "refclock_nmea: found PPS source \"%s\"", device);
> >> +			return(nmea_ppsapi(peer, 0, 0)); 
> >> +		}
> > 
> > ... to here is useless. Again if you do in such a way that pp->io.fd
> > is the serial line and /dev/pps{n} is the alternate device, everything
> > should work ok.
> 
> Yes, for LinuxPPS w/ linediscipline implementation.
> But since other implementations might change stuff about /dev/gps0 in a
>  similar way as you do with hiding code in time_pps_create I opted for
> this small block of code.
> I removed it now but I hope at least you understand.

I may understand but as already said, with the NTPD folks we agree on
the "reference" refclock code: PARSE
(http://www.cis.udel.edu/~mills/ntp/html/drivers/driver8.html).

> > In the past we discuss with NTPD guys on this topic and we agree on
> > the fact that main and alternate PPS devices should be opened with two
> > time_pps_create() calls as follow:
> 
> Why wasn't the bug #610 not changed accordingly?

I don't know...

> That bug is our only reference w.r.t. the changes necessary to make the
> NMEA refclock work with LinuxPPS.
> Only when that bug is fixed it'll work out of the box.
> 
> Please have a look at the attached patch.
> if there's no problems we could update the bug #610 and draw some
> attention to it. :-)

It seems ok to me but test it with latest PPS code before updating. :)

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti at enneenne.com
Linux Device Driver                          giometti at linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti



More information about the LinuxPPS mailing list