[LinuxPPS] refclock_nmea patch
Rodolfo Giometti
giometti at enneenne.com
Tue Oct 23 18:55:00 CEST 2007
On Tue, Oct 23, 2007 at 06:41:48PM +0200, Udo van den Heuvel wrote:
> Rodolfo Giometti wrote:
> > On Tue, Oct 23, 2007 at 06:26:53PM +0200, Udo van den Heuvel wrote:
> >> I see in the LinuxPPS source that a port is checked: First we check if
> >> current device is a PPS valid PPS one.
> >> What is the use? (if this test fails on my /dev/gps0?)
> >
> > Just to verify that the supplied device is a PPS source. It fails
> > because your /dev/gps0 is a serial line and _not_ a PPS source.
>
> But how does LinuxPPS which /dev/pps* to create for which serial ports?
> Only during the startup phase we use setserial to enable hardpps etc.
This is not important, _you_ know which /dev/pps* is connected with
your serial line which is connected with you GPS antenna. Just as
_you_ know which /dev/ttyS* is connected with your serial line which
is connected with you GPS antenna. :)
> >> So what use is it then to make /dev/gps0 if we have an automagic /dev/pps0?
> >
> > Beacuse /dev/pps0 is _only_ a PPS source so you cannot get GPS/NMEA
> > data from it. That's why you need both /dev/gps0 and /dev/pps0. The
> > former is used to collect GPS/NMEA data while the latter is is used to
> > collect PPS data.
> >
> >> (just trying to understand)
> >
> > Hope I was clear now. :)
> >
> > Does your code work now? :D
>
> The code works/worked. Only the logging is/was unclear, combined with
> the different functioning of LinuxPPS.
Then modify the logs. :)
Can I see the working patch? I'll publish it on LinuxPPS main site.
> > There is nothing strange since in LinuxPPS a PPS source _cannot_ be
> > also a GPS data source.
> >
> > This was the trick which allows us to be RFC compliant! ;)
>
> But it was (also?) about being able to address devices that do not
> appear as files in the system?
> What item of the RFC prohibits the re-use of a fd for GPS/PPS?
Nobody but in LinuxPPS a PPS device is separated by a GPS data source
(for example the serial port), this allow users to define their PPS
sources which is connected with CPU's GPIOs which don't have a
dedicated device.
In the Linux PPSKit the PPS source was joined with the serial line but
this introduces several kernel problems whose prevent it kernel
inclusion. :)
Ciao,
Rodolfo
P.S. Please try also these patches I suggested to Reg:
http://ml.enneenne.com/pipermail/linuxpps/2007-October/001182.html
--
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