[LinuxPPS] refclock_nmea patch

Rodolfo Giometti giometti at enneenne.com
Tue Oct 23 19:27:46 CEST 2007


On Tue, Oct 23, 2007 at 07:14:19PM +0200, Udo van den Heuvel wrote:
> Rodolfo Giometti wrote:
> >> 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 how does LinuxPPS know which (in my case) serial line to map to
> /dev/pps0?

It doesn't. He doesn't need to map anything. _You_ know which are the
devices involved.

Maybe you can look into /sys/class/pss in order to find out which is
the pps device connected with your serial line 0 (see the wiki), but
nothing else.

> >>> 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.
> 
> See the lastest patch I posted.

Ok, thanks.

> >>> 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.
> 
> Yes, but that is an extra, not a reason to reduce the useful simplicity
> we had in the old situation.

The old situation was _not_ RFC compliant and we had poor changes to
enter into NTPD mainline...

> > P.S. Please try also these patches I suggested to Reg:
> > 
> >    http://ml.enneenne.com/pipermail/linuxpps/2007-October/001182.html
> 
> How can I test them?

Apply them.

> Or no extra errors means OK?

No. You have to apply them. However I'm just publishing the latest
patch with these patches included...

> BTW:
> 
>   CC      drivers/pps/sysfs.o
> drivers/pps/sysfs.c: In function âpps_sysfs_create_source_entryâ:
> drivers/pps/sysfs.c:113: warning: ignoring return value of
> âdevice_create_fileâ, declared with attribute warn_unused_result
> drivers/pps/sysfs.c:116: warning: ignoring return value of
> âdevice_create_fileâ, declared with attribute warn_unused_result
> drivers/pps/sysfs.c:118: warning: ignoring return value of
> âdevice_create_fileâ, declared with attribute warn_unused_result
> drivers/pps/sysfs.c:119: warning: ignoring return value of
> âdevice_create_fileâ, declared with attribute warn_unused_result
> drivers/pps/sysfs.c:120: warning: ignoring return value of
> âdevice_create_fileâ, declared with attribute warn_unused_result
> drivers/pps/sysfs.c:121: warning: ignoring return value of
> âdevice_create_fileâ, declared with attribute warn_unused_result

Already fixed! Wait for the last patch coming ASAP. :)

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