[LinuxPPS] New LinuxPPS user intro

Cirilo Bernardo cirilo.bernardo at gmail.com
Thu Sep 18 02:40:37 CEST 2008


On Wed, Sep 17, 2008 at 10:32 PM, Luca Bertagnolio <lucaberta at yahoo.com> wrote:
> Hello all,
[snip]
> Here is where I am, and the problem I am facing:
>
> 1- LinuxPPS patches to 2.6.26-gentoo-r1 with PPSAPI 5.3.1 pulled from the web working OK, ppstest confirms the 200ms long pulse on the DCD
>
> 2- GPS 18 LVC with latest firmware, only sentence selected is GPRMC, minicom displays the NMEA data coming in on /dev/ttyS1
>
> 3- using Gentoo, so I modified the current portage ebuild of nptd 4.2.4p4 to include the patch to driver 20, and rebuilt ntpd OK
>
> 4- using /dev/ttyS1 for the NMEA data and /dev/pps0 for PPS, so I lined /dev/gps1 and /dev/gpspps1 to those devices.  I did not bother to fiddle with udev at this stage, so I hacked the /etc/init.d/ntpd startup script adding the following:
>
>        if [ ! -L /dev/gpspps1 ] ; then
>                /usr/local/sbin/ppsldisc /dev/ttyS1 &
>                ln -s /dev/ttyS1 /dev/gps1
>                ln -s /dev/pps0 /dev/gpspps1
>        fi
> 5- my /etc/ntp.conf file has the following line to define my refclock:
>
> server  127.127.20.1 prefer minpoll 4
> fudge   127.127.20.1 flag3 1 flag2 0 time1 0.000 stratum 0 refid PPS
>
> When I fire up ntpd, everything seems to be working fine *except* that I see my GPS consistently about 170ms behind UTC... :-(
>
[snip]
>
> Ciao, Luca IK2OVV / K2OVV
> Milan, Italy
>

The 170ms sounds suspiciously like the duration of your DCD pulse.
Perhaps the DCD should be inverted?  Check the level of the DCD signal
and make sure that the 'assert' occurs at the beginning of the pulse,
not at the end.  Depending on the design of your inverter (a simple
transistor or MOSFET and a few resistors will do) you will add
anywhere from 2ns to 200ns delay in the line.

- Cirilo



More information about the LinuxPPS mailing list