[LinuxPPS] Linuxpps on 2.6.28 vs. ntpd 4.2.4p6

Hal V. Engel hvengel at astound.net
Wed Jan 14 18:34:03 CET 2009


On Wednesday 14 January 2009 03:42:54 Heiko Gerstung wrote:
> Hi everybody!
>
> I am trying to prepare a new kernel for our series of NTP time server
> appliances called LANTIME (see our website if you are interested) but I
> have problems getting ntp-4.2.4p6 to work with my 2.6.28 kernel and the
> rc6 linuxpps patch.
>
> What already works is that if I start ppsldisc /dev/ttyS0 on a console,
> I can see that assert and clear events are correctly recognized in
> /sys/class/pps/pps/assert and clear and they represent the 200ms pulse
> width we are using on our GPS receivers.
>
> But for some it does not work when I start ppsldisc as a background
> process during startup. I can see that there are a number of events
> recorded because the assert file for example shows a timestamp and the
> event count, which can be #32 for example or #43 but does not recognize
> any further events until I "killall ppsldisc" and run ppsldisc on my
> console (in the foreground).
>
> Additionally, when I start ntpd, it cannot initialize the Atom driver
>
> and the parse driver also cannot setup PPS usage:
> > Jan 14 09:17:19 LantimeV5 ntpd[13940]: PARSE receiver #0: parse_start:
> > could not set up PPS: Invalid argument
> > Jan 14 09:17:19 LantimeV5 ntpd[13940]: PARSE receiver #0:
> > parse_ppsapi: time_pps_getcap failed: Bad file descriptor
> > Jan 14 09:17:19 LantimeV5 ntpd[13940]: refclock_atom: time_pps_create
> > failed: Inappropriate ioctl for device
>
> I am not running udev on my machine and therefore have to create the
> /dev/pps0 device node manually. I can see from /sys/class/pps/pps0/dev
> that this should be c254:0 and therefore run "mknod /dev/pps0 c 254 0"
> before doing anything else at startup.
>
> What am I missing? First and foremost I would like to get ntpd to use
> the PPS stuff, but if someone has any hints on why ppsldisc does not
> work when it is sent into the background, I would be grateful for any
> hints.
>
> Best Regards,
>   Heiko

A number of users on the list have reported issues with ntp not picking up the 
PPS signal the first time things are started.  Initially some thought that 
this was a difference between starting ppsldisc in the foreground vs. starting 
it in the background.  But this does not appear to be the case.  What most of 
those who are running into this issue are doing is running the startup 
sequence then stopping ntp and then killing ppsldisc and then starting 
everything a second time.  At this point one on knows why this can fail on the 
first start.  It appears to always work on the second try.

Hal



More information about the LinuxPPS mailing list