[LinuxPPS] Dumb Question about /dev/lp0
Rodolfo Giometti
giometti at enneenne.com
Fri May 4 11:10:29 CEST 2007
On Thu, May 03, 2007 at 12:40:42PM -0600, clemens at dwf.com wrote:
> OK, I really have to run to get into the office, so I might not
> be thinking this thru clearly, but I was just about to try the
> /dev/lp0 parallel port with ntpd, and I find that I dont get
> anything there nor with ppstest.
>
> Lets stay with ppstest:
>
> [root at deneb PPS-user]# ppstest /dev/lp0
> trying PPS source "/dev/lp0"
> found PPS source #0 "parport0" on "/dev/lp0"
> ok, found 1 source(s), now start fetching data...
>
> <and it hangs>
I suppose it hangs while waiting for PPS data. Is that true? You can
use the strace command to verify that.
> Looking at /sys/class/pps
> [root at deneb 00]# more assert
> 0.000000000#0
> [root at deneb 00]# more mode
> 1151
>
> It would take longer than I have to check the mode bits,
> but its clear that assert has nothing in it.
This means that no PPS signal is arriving to the parallel port.
> Do I have to do something like 'ppsctl' to turn this
> parallel port on? The obvious attempt with
>
> [root at deneb PPS-user]# ppsctl /dev/lp0 enable
> ioctl(TIOCGSERIAL): Invalid argument
>
> doesnt do anything...
Of course this command was about the serial lines! :)
You shouldn't do nothing special for the parallel port _apart_
checking if the interrupt line is enabled into parport. Try the command:
cat /proc/interrupts | grep parport
If you get something like:
7: 0 IO-APIC-edge parport0
and the PPS signal is arriving to the parallel port you should see the
second number is increasing one unit per second.
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