[LinuxPPS] pps patch does not see my serial ports

Folkert van Heusden folkert at vanheusden.com
Sun Jan 13 15:40:29 CET 2008


Oh hang on, I *might* have solved the problem:

it seems ppsctl and friends don't like it that udev can rename a
device-name.
E.g. I had in '/etc/udev/rules.d/10-local.rules':
KERNEL=="ttyS1",    NAME="gps0"
but after I changed that to:
KERNEL=="ttyS1",    SYMLINK+="gps0"
I get this:
belle:/usr/src/linux-2.6-2.6.22/Documentation/pps# ./ppstest /dev/ttyS1
trying PPS source "/dev/ttyS1"
found PPS source #1 "serial1" on "/dev/ttyS1"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1200235183.000644433, sequence: 984 - clear  1200235182.100653995, sequence: 983
source 0 - assert 1200235183.000644433, sequence: 984 - clear  1200235183.100656658, sequence: 984
source 0 - assert 1200235184.000651938, sequence: 985 - clear  1200235183.100656658, sequence: 984
so it seems to work!
And now I still have gps0 pointing to the correct serial device so that ntpd stays happy too.


On Sun, Jan 13, 2008 at 03:36:19PM +0100, Folkert van Heusden wrote:
> Even more information:
> 
> belle:/home/folkert# cat /sys/class/pps/00/path
> /dev/lp0
> 
> belle:/home/folkert# cat /sys/class/pps/01/path
> /dev/ttyS1
> 
> After modprobe of ktimer:
> belle:/usr/src/linux-2.6-2.6.22# dmesg | tail -n 5
> PPS event at 4295217944
> PPS event at 4295218194
> PPS event at 4295218444
> PPS event at 4295218694
> PPS event at 4295218944
> 
> 
> 
> On Sun, Jan 13, 2008 at 03:30:23PM +0100, Folkert van Heusden wrote:
> > I forgot some information:
> > 
> > belle:/usr/src/linux-2.6-2.6.22/Documentation/pps# ls -lR /sys/class/pps/
> > /sys/class/pps/:
> > total 0
> > drwxr-xr-x 2 root root 0 2008-01-13 15:21 00
> > drwxr-xr-x 2 root root 0 2008-01-13 15:23 01
> > 
> > /sys/class/pps/00:
> > total 0
> > -r--r--r-- 1 root root 4096 2008-01-13 15:21 assert
> > -r--r--r-- 1 root root 4096 2008-01-13 15:21 echo
> > -r--r--r-- 1 root root 4096 2008-01-13 15:21 mode
> > -r--r--r-- 1 root root 4096 2008-01-13 15:21 name
> > -r--r--r-- 1 root root 4096 2008-01-13 15:21 path
> > lrwxrwxrwx 1 root root    0 2008-01-13 15:13 subsystem -> ../../../class/pps
> > --w------- 1 root root 4096 2008-01-13 15:13 uevent
> > 
> > /sys/class/pps/01:
> > total 0
> > -r--r--r-- 1 root root 4096 2008-01-13 15:28 assert
> > -r--r--r-- 1 root root 4096 2008-01-13 15:28 clear
> > -r--r--r-- 1 root root 4096 2008-01-13 15:28 echo
> > -r--r--r-- 1 root root 4096 2008-01-13 15:28 mode
> > -r--r--r-- 1 root root 4096 2008-01-13 15:28 name
> > -r--r--r-- 1 root root 4096 2008-01-13 15:28 path
> > lrwxrwxrwx 1 root root    0 2008-01-13 15:23 subsystem -> ../../../class/pps
> > --w------- 1 root root 4096 2008-01-13 15:28 uevent
> > 
> > 
> > it seems 01 appeared AFTER I executed "setserial  /dev/gps0 hardpps"
> > 
> > I also executed "ppsctl /dev/gps0 enable" but that did not help either
> > 
> > On Sun, Jan 13, 2008 at 03:27:34PM +0100, Folkert van Heusden wrote:
> > > Hi,
> > > 
> > > Took a while but I succeeded in creating a debian-aware kernel image
> > > package with PPS support:
> > > 
> > > belle:/usr/src/linux-2.6-2.6.22/Documentation/pps# dmesg | grep -i pps
> > > Linux version 2.6.22.pps-nodeb (root at belle) (gcc version 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)) #1 SMP Sun Jan 13 14:43:34 CET 2008
> > > LinuxPPS API ver. 2 registered
> > > parport_pc 00:07: PPS source #0 "/dev/lp0" added
> > > parport_serial 0000:05:02.0: PPS support disabled due port "/dev/lp1" is in polling mode
> > > 
> > > As you can see though it does not detect the serial ports in the system.
> > > 
> > > belle:/usr/src/linux-2.6-2.6.22/Documentation/pps# grep serial /proc/interrupts
> > >  18:        137       6066   IO-APIC-fasteoi   uhci_hcd:usb5, ehci_hcd:usb6, serial
> > > 
> > > 05:02.0 Communication controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)
> > >         Subsystem: LSI Logic / Symbios Logic 1P2S
> > >         Flags: medium devsel, IRQ 18
> > >         I/O ports at 8400 [size=8]
> > >         I/O ports at 8800 [size=8]
> > >         I/O ports at 8c00 [size=8]
> > >         I/O ports at 9000 [size=8]
> > >         I/O ports at 9400 [size=8]
> > >         I/O ports at 9800 [size=16]
> > > 
> > > gps0 is (using udev) the first port on the plugin serial adapter as shown above
> > > 
> > > belle:/usr/src/linux-2.6-2.6.22/Documentation/pps# ./ppstest /dev/gps0
> > > trying PPS source "/dev/gps0"
> > > no available PPS source in the system
> > > 
> > > It does see the parallel port though:
> > > belle:/usr/src/linux-2.6-2.6.22/Documentation/pps# ./ppstest
> > > found PPS source #0 "parport0" on "/dev/lp0"
> > > ok, found 1 source(s), now start fetching data...
> > > time_pps_fetch() error -1 (Connection timed out)
> > > but my GPS is connected to the serial port.
> > > 
> > > 
> > > belle:/usr/src/linux-2.6-2.6.22/Documentation/pps# dmesg | grep tty
> > > 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> > > 0000:05:02.0: ttyS1 at I/O 0x8400 (irq = 18) is a 16550A
> > > 0000:05:02.0: ttyS2 at I/O 0x8800 (irq = 18) is a 16550A
> > > 
> > > gps0 -> ttyS1
> > > 
> > > 
> > > Folkert van Heusden
> > > 
> > > -- 
> > > To MultiTail einai ena polymorfiko ergaleio gia ta logfiles kai tin
> > > eksodo twn entolwn. Prosferei: filtrarisma, xrwmatismo, sygxwneysi,
> > > diaforetikes provoles. http://www.vanheusden.com/multitail/
> > > ----------------------------------------------------------------------
> > > Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
> > 
> > 
> > Folkert van Heusden
> > 
> > -- 
> > www.vanheusden.com/multitail - win een vlaai van multivlaai! zorg
> > ervoor dat multitail opgenomen wordt in Fedora Core, AIX, Solaris of
> > HP/UX en win een vlaai naar keuze
> > ----------------------------------------------------------------------
> > Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
> 
> 
> Folkert van Heusden
> 
> -- 
> MultiTail na wan makriki wrokosani fu tan luku den logfile nanga san
> den commando spiti puru. Piki puru spesrutu sani, wroko nanga difrenti
> kroru, tya kon makandra, nanga wan lo moro.
> http://www.vanheusden.com/multitail/
> ----------------------------------------------------------------------
> Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
> 
> _______________________________________________
> LinuxPPS mailing list
> LinuxPPS at ml.enneenne.com
> http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
> Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support


Folkert van Heusden

-- 

Multitail - gibkaja utilita po sledovaniju log-fajlov i vyvoda
kommand. Fil'trovanie, raskrašivanie, slijanie, vizual'noe sravnenie,
i t.d.  http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com



More information about the LinuxPPS mailing list