Port-sparc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: DCD as an alternate /dev device?



On 8/25/2011 17:29, Ken Hornstein wrote:
#PPS_ATOM refclock flag2 DCD clear, flag3 kernel PPS
#opens /dev/pps1
server          127.127.22.1
fudge           127.127.22.1  flag2 1 flag3 1 refid PPS

This segment gets added if I try to use the GPS data as a clock:

#GPS_NMEA refclock mode 1 $GPRMC only
#opens /dev/gps1
server         127.127.20.1  minpoll 4 mode 1 noselect
fudge          127.127.20.1  time2 0.245 refid GPS

What happens if you reverse the order of these two?

I see there is code that will reset the PPS state upon open, but it should
only happen on the FIRST open of a device; subsequent simultaneous opens
should still work.  You could always put an extra printf() in that code
in zsopen() to make sure it's only resetting the PPS capture state once.
You could also easily test outside of ntpd with the existing tools to
see if a second open a device stops PPS capture.

If I attempt to open /dev/ttyb while ntpd is running with an active PPS I nothing or a device busy error.

For example, right now ntpd with PPS only is running.  If I issue:

cat /dev/ttyb

I get nothing. In fact it just sits there waiting for something until I break out. PPS never stops responding during this period.

If I stop ntpd and issue the same, I also get nothing but the command does exit and return to the prompt.

Reversing the two reference clocks doesn't change the outcome. It still fails to receive anything from the PPS while the GPS clock is active.

Home | Main Index | Thread Index | Old Index