[LinuxPPS] ntp 'bugs'

Udo van den Heuvel udovdh at xs4all.nl
Sun Jun 29 13:22:40 CEST 2008


Rodolfo Giometti wrote:
>> +#define LENPPS		PPS_MAX_NAME_LEN
> 
> This must be removed since is LinuxPPS specific and not used below.

Done.

>> +	        if (fd > 0) {	/* /dev/gpspps0 exists */
> 
> Should be >= 0...

Changed. The ntpd reviewers didn't comment on this...


>>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.

> 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?
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. :-)

Udo
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: refclock_nmea_ldisc2.patch
Url: http://ml.enneenne.com/pipermail/linuxpps/attachments/20080629/558b31cd/attachment.txt 


More information about the LinuxPPS mailing list