[LinuxPPS] More on problem with the PPS Device

Rodolfo Giometti giometti at enneenne.com
Sat Jul 5 08:10:52 CEST 2008


On Sat, Jul 05, 2008 at 06:25:19AM +0200, Udo van den Heuvel wrote:
> Rodolfo Giometti wrote:
> >> The suggestion done as a respone to our request via the bug entry, i.e.
> >> doing the ldisc thing in time_pps_create, what about that one for an answer?
> > 
> > I think we should drop this solution.
> 
> Without a technical reason?

I explained why. However here my "technical" reasons:

1) PPS sorces connected with serial ports are the most popular ones
but they are *not* the only ones, so the refclocks code should *not*
be specific for one kind of sources.

2) As bluetooth does we should change the ldisc by using an external
program. This allows using udev as normal and avoids dirty tricks to
get the /dev/pps{N} files.

I suggest you to do a special init daemon (as bluetooth has) which
setup the system according to its configuration file.

Here /etc/pps.conf example:

	# Add here serial ports where your PPS sources are
	# connected to.

	PPS_SERIAL_PORTS="/dev/ttyS0 /dev/ttyS1"

Then at boot time the init script runs:

	/etc/init.d/pps start

which runs ppsldisc for each ports. At shutdown we have:

	/etc/init.d/pps stop

which removes the previously created PPS sources. We can also have:

	/etc/init.d/pps start /dev/ttyS1

which enable the PPS source only on /dev/ttyS1 etc..

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti at enneenne.com
Linux Device Driver                          giometti at linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti



More information about the LinuxPPS mailing list