[LinuxPPS] refclock_nmea patch
Rodolfo Giometti
giometti at enneenne.com
Mon Oct 22 21:36:05 CEST 2007
On Mon, Oct 22, 2007 at 08:20:04PM +0200, Udo van den Heuvel wrote:
> Rodolfo Giometti wrote:
> >> Note the %d in the message string and that the first gps0 device is not
> >> used. %d was fixed with your suggestion.
> >
> > Good.
>
> /dev/gps0 is not used!...
Is /dev/gps0 the GPS data device or not? It points to /dev/ttyS0,
isn't it?
> >> /dev/gps0 points to /dev/ttyS0. Is the fd still open when it reaches the
> >> LinuxPPS part that we change? Maybe reopen the fd?
> >
> > No, the fd is opened since it is passed to the first
> > pps_time_create().
>
> So why is the alternate devise used?
Because your main device may not be a PPS data source. In LinuxPPS
it's _always_ true.
> >> [root at epia ntpd]# setserial /dev/ttyS0
> >> /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4, Flags: hardpps low_latency
> >> [root at epia ntpd]# setserial /dev/gps0
> >> /dev/gps0, UART: 16550A, Port: 0x03f8, IRQ: 4, Flags: hardpps low_latency
> >
> > Are yo uusing patched setserial? If so I don't see the hardpps
> > flag.
>
> See the output...
Glom! O_o Sorry, you are rigth again! Time to stop working today! ;)
> >> [root at epia ntpd]# setserial /dev/pps0
> >
> > Why do you use setserial on /dev/pps0?
>
> Just to see what it is.
> Apparently it is created by the LinuxPPS patch.
> But why only for pps0 and not for gps0?
gps0 is the GPS data source, not the PPS data one.
> >
> >> [root at epia ntpd]# ls -l /dev/?ps0
> >> lrwxrwxrwx 1 root root 10 2007-10-22 19:17 /dev/gps0 -> /dev/ttyS0
> >> crw------- 1 root root 254, 0 2007-10-22 19:17 /dev/pps0
> >> [root at epia ntpd]# ls -l /dev/ttyS0
> >> crw-rw---- 1 root uucp 4, 64 2007-10-22 19:36 /dev/ttyS0
> >>
> >> Any ideas!?
> >
> > About what?
>
> Why only for pps0 and not for gps0?
> /dev/gps0 is not used at all!
gps0 should be use by NTPD in order to get GPS data.
> > Great job! Just fix these few errors and you may submit your patch to
> > the NTPD mail list for inclusion! :)
>
> First I want to understand why /dev/gps0 is not used.
> Then I can send it out I think.
After running ntpd get its PID and then look into /proc/<pid>/fd/
which files has been opened.
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
More information about the LinuxPPS
mailing list