[LinuxPPS] Linuxpps on 2.6.28 vs. ntpd 4.2.4p6

clemens at dwf.com clemens at dwf.com
Wed Jan 14 18:28:42 CET 2009


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

Well, you seem to be describing two problems.
For the first of these, in your script, first do the ppsldisc, then sleep
for 5 seconds before trying to start ntpd.  It takes a while for the device
to get built, and I found that putting in the 5 second sleep solved my
problems.

The second appears to be a problem that I have seen on my 'main machine'
but not elsewhere.  On starting I will see a single timestamp with a
number in it of 5 or 6.  And nothing after that.  I questioned whether
it could be hardware, and bought a new 4port tty board, but after a
week had the same problem there.  At this point I assume the problem
is software, not hardware, but have no idea what it could be.  On occasion
things will magically start working again, but trading this GPS to
another machine works, and trading the GPS on another machine here 
doesnt help...

Mumph.

Sorry I cant help on that front, but its an ongoing problem that I
havent had the time to really look at.
-- 
                                        Reg.Clemens
                                        reg at dwf.com





More information about the LinuxPPS mailing list