[LinuxPPS] FW: Linux PPS with Garmin 18xLVC using 2.6.35.7 linux Kernel

Kent Headley headley at mbari.org
Thu Oct 28 01:37:00 CEST 2010




LinuxPPS maintainers,

Thanks for incorporating PPS support into the linux kernel, and for the good
documentation you provide.

The basic issue I¹m hoping you can help with is that the ktimer pps source
appears to work OK, but I am unable to detect PPS input from a (Garmin
18xLVC) GPS.
It seems like others have been successful in using this particular GPS. I
imagine it¹s either a configuration error on my part or a problem with using
a USB-serial converter. Are only actual (8250 compatible) UARTS supported?

I saw a recent and similar post on the mailing list archive, but it didn¹t
seem to apply here (the author was using a PCMCIA serial card). An older
thread from 2008 suggested that some method of capturing PPS from USB
sources had been/was being developed.

First, a few key details of my configuration:

> PC: Asus Eee PC 8G
> Serial port: Keyspan 19H USB-Serial converter or Edgeport 22/c (the Eee PC has
> no external serial ports)
> 
> GPS : Garmin 18xLVC (configured using Garmin SNSRCFG)
>     - 4800 bps
>     - PPS enabled (200 ms pulse width)
>     - 2D mode
>     - alt 10m
>     - PPS output connected to pin 1 of DB9 connector
>     - otherwise using factory default configuration
>   
> Linux Kernel: 2.6.35.7 built using Debian Lenny
>     - PPS options are built as modules, as are
>     - parallel port and 8250 serial port support are built as modules
> 
> pps-tools: cloned git archive ~10/20/2010
> ldattach: from util-linux-ng 2.17.2
> Additional configuration and package version information below...



When the Keyspan USB-serial adapter is plugged in,  dev node /dev/ttyUSB0 is
created:

> crw-rw---- 1 root dialout 188,  0 2010-10-25 18:37 /dev/ttyUSB0

setserial returns an error when looking at the USB-serial port:
> setser ­g ­a /dev/ttyUSB0
> Cannot get serial info: invalid argument

I plug in the GPS and can see that it is getting valid fixes and generating
valid NMEA messages:

    cat /dev/ttyUSB0
> $GPRMC,163343,A,3648.1063,N,12147.2817,W,000.0,133.0,261010,014.8,E*6C
> $GPGGA,163343,3648.1063,N,12147.2817,W,1,05,2.6,19.1,M,-33.2,M,,*47
> $GPGSA,A,3,11,15,17,27,28,,,,,,,,2.8,2.6,1.0*30
> $GPGSV,3,1,10,11,25,062,30,15,33,289,18,17,82,152,27,27,28,315,14*76
> $GPGSV,3,2,10,28,53,045,35,04,08,169,00,07,12,129,00,08,45,119,00*7E
> $GPGSV,3,3,10,09,08,315,00,26,47,243,00*7C
> $GPRMC,163344,A,3648.1066,N,12147.2824,W,000.0,133.0,261010,014.8,E*6E
> $GPGGA,163344,3648.1066,N,12147.2824,W,1,04,3.7,19.7,M,-33.2,M,,*42
> $GPGSA,A,3,11,15,17,28,,,,,,,,,5.1,3.7,3.4*3D
> $GPGSV,3,1,10,11,25,062,30,15,33,289,17,17,82,152,27,28,53,045,35*7F
> $GPGSV,3,2,10,04,08,169,00,07,12,129,00,08,45,119,00,09,08,315,00*73
> $GPGSV,3,3,10,26,47,243,00,27,28,316,00*71


A scope reading between PPS/DCD (pin 1) and ground (pin 5) confirms the GPS
is propagating the (0-5V 200ms) PPS signal to the end of the GPS cable.
The serial data output is ~10 Vpp (+/-5 V). Also, statserial shows that DCD
is changing (though it only scans at 1 Hz), so at some level, the PPS signal
is getting to the computer.
Does PPS need to be at RS232 levels or is TTL OK?

To test linuxPPS, I load the appropriate modules
> modprobe 8250
> modprobe pps-core
> modprobe pps-ktimer

Here are the modules currently running
> Module                  Size  Used by
> io_ti                  27188  1
> pps_ldisc               1358  1
> pps_core                5257  1 pps_ldisc
> 8250                   21577  0
> serial_core            12121  1 8250
> nfsd                  198719  11
> lockd                  49231  1 nfsd
> nfs_acl                 1707  1 nfsd
> auth_rpcgss            26690  1 nfsd
> sunrpc                133921  11 nfsd,lockd,nfs_acl,auth_rpcgss
> exportfs                2482  1 nfsd
> ipv6                  202607  21
> loop                    9589  0
> eeepc_laptop           10600  0
> sparse_keymap           1791  1 eeepc_laptop
> video                  15750  0
> battery                 7720  0
> output                  1228  1 video
> ac                      2259  0
> rfkill                 10788  1 eeepc_laptop
> led_class               1579  1 eeepc_laptop
> button                  3682  0
> processor              24990  1
> tpm_tis                 5608  0
> i2c_i801                6582  0
> keyspan                23716  0
> tpm                     8077  1 tpm_tis
> tpm_bios                3657  1 tpm
> psmouse                28005  0
> rng_core                2426  0
> serio_raw               3028  0
> i2c_core               12593  1 i2c_i801
> usbserial              21796  4 io_ti,keyspan
> atl2                   17811  0
> pcspkr                  1215  0
> evdev                   5685  0
> ext3                   93172  1
> jbd                    31596  1 ext3
> mbcache                 3770  1 ext3
> sd_mod                 24378  3
> ahci                   16853  0
> libahci                14058  1 ahci
> ata_generic             2119  0
> ata_piix               17444  0
> pata_acpi               1964  0
> usb_storage            24449  2
> usb_libusual            7944  1 usb_storage
> libata                118264  5 ahci,libahci,ata_generic,ata_piix,pata_acpi
> scsi_mod              129500  3 sd_mod,usb_storage,libata
> ide_pci_generic         1980  0
> ehci_hcd               28785  0
> uhci_hcd               15859  0
> ide_core               61926  1 ide_pci_generic
> usbcore                96374  8
> io_ti,keyspan,usbserial,usb_storage,usb_libusual,ehci_hcd,uhci_hcd
> thermal                 9510  0
> fan                     2538  0
> thermal_sys             9722  4 video,processor,thermal,fan

and can see the following indications that it the ktimer source working:

- /sys/class/pps/pps0 is created (and assert value updates at 1 Hz)

- ppstest shows PPS event
> trying PPS source ³/dev/pps0²
> found PPS source ³/dev/pps0²
> ok, found 1 source(s), now start fetching data...
> source 0 ­ assert 1288111830.967053322, sequence: 441 = clear 0.0000000000,
> sequence: 0
> source 0 ­ assert 1288111831.967056046, sequence: 442 = clear 0.0000000000,
> sequence: 0
> source 0 ­ assert 1288111832.967053043, sequence: 443 = clear 0.0000000000,
> sequence: 0

- kernel debug messages are visible using dmesg and update every 1 sec
> [ 1906.647317] source ktimer got cdev (251:1)
> [ 1906.647327] new PPS source ktimer at ID 1
> [ 1906.647334] ktimer PPS source registered at 1
> [ 1907.644027] PPS event at 401911
> [ 1907.644040] PPS event on source 1 at 1288056675.23052367
> [ 1907.644047] capture assert seq #1 for source 1
> [ 1908.644024] PPS event at 402161
> [ 1908.644036] PPS event on source 1 at 1288056676.23052437
> [ 1908.644046] capture assert seq #2 for source 1
> [ 1909.644023] PPS event at 402411
> [ 1909.644033] PPS event on source 1 at 1288056677.23051948
> [ 1909.644040] capture assert seq #3 for source 1
> [ 1910.644026] PPS event at 402661
> [ 1910.644039] PPS event on source 1 at 1288056678.23052227
> [ 1910.644047] capture assert seq #4 for source 1
> [ 1911.644023] PPS event at 402911


Next I set up the PPS line discipline on the GPS device:

    ldattach ­18 ­s 4800 PPS /dev/ttyUSB0

This appears to go OK:
   
 - /sys/class/pps/pps1 is created with the usual contents
 - dmesg and /var/log/messages note the new PPS source and do not indicate
any errors
> [  905.058976] source usbserial0 got cdev (251:0)
> [  905.058985] new PPS source usbserial0 at ID 1
> [  905.058998] PPS source #0 "/dev/ttyUSB0" added

However, there are no PPS events in the kernel logs (dmesg,
/var/log/messages) and the sysfs assert and clear values don¹t update.

When I run ppstest on the GPS, I get the following timeout errors
> trying PPS source ³/dev/pps1²
> found PPS source ³/dev/pps1²
> ok, found 1 source(s), now start fetching data...
> time_pps_fetch() error -1 (Connection timed out)
> time_pps_fetch() error -1 (Connection timed out)

and the following kernel debug appears in /var/log/messages
> [ 1188.632483] PPS_GETPARAMS: source 0
> [ 1188.632628] PPS_GETCAP: source 0
> [ 1188.632634] PPS_GETPARAMS: source 0
> [ 1188.632640] PPS_SETPARAMS: source 0
> [ 1188.632647] time format unspecified (11)
> [ 1188.632799] PPS_FETCH: source 0
> [ 1188.632805] timeout 3.000000000
> [ 1191.632285] PPS_FETCH: source 0
> [ 1191.632297] timeout 3.000000000
> [ 1194.632216] PPS_FETCH: source 0
> [ 1194.632225] timeout 3.000000000

I also tried 
- using symlinks (/dev/gps0->/dev/ttyUSB0 and /dev/gpspps0->/dev/pps0) as I
had seen somewhere, but I think this is either for ntpd or is obsolete.
- running the USB device alone (no ktimer source), but that didn¹t work
either.

I¹ll include some more (sorry if too much) configuration info that may or
may not be useful:
===================== more config =======================
lsusb output:
> Bus 005 Device 005: ID eb1a:2761 eMPIA Technology, Inc. EeePC 701 integrated
> Webcam
> Bus 005 Device 004: ID 0951:1606 Kingston Technology
> Bus 005 Device 003: ID 03f0:3307 Hewlett-Packard
> Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 002 Device 005: ID 06cd:0121 Keyspan USA-19hs serial adapter
> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub¹

lspci output:
> 00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express
> Processor to DRAM Controller (rev 04)
> 00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML
> Express Graphics Controller (rev 04)
> 00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express
> Graphics Controller (rev 04)
> 00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family)
> High Definition Audio Controller (rev 04)
> 00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI
> Express Port 1 (rev 04)
> 00:1c.1 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI
> Express Port 2 (rev 04)
> 00:1c.2 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI
> Express Port 3 (rev 04)
> 00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family)
> USB UHCI #1 (rev 04)
> 00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family)
> USB UHCI #2 (rev 04)
> 00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family)
> USB UHCI #3 (rev 04)
> 00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family)
> USB UHCI #4 (rev 04)
> 00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family)
> USB2 EHCI Controller (rev 04)
> 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d4)
> 00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge
> (rev 04)
> 00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev
> 04)
> 00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus
> Controller (rev 04)
> 01:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg
> Wireless PCI Express Adapter (rev 01)
> 03:00.0 Ethernet controller: Attansic Technology Corp. L2 100 Mbit Ethernet
> Adapter (rev a0)

lscpu output
> Architecture:          i686
> CPU op-mode(s):        32-bit
> CPU(s):                1
> Thread(s) per core:    1
> Core(s) per socket:    1
> CPU socket(s):         1
> Vendor ID:             GenuineIntel
> CPU family:            6
> Model:                 13
> Stepping:              8
> CPU MHz:               630.162

Partial list of installed package versions:
>     Name                                 Version
> Description
> ii  apt                                  0.7.20.2+lenny2            Advanced
> front-end for dpkg
> ii  apt-utils                            0.7.20.2+lenny2            APT
> utility programs
> ii  aptitude                             0.4.11.11-1~lenny1
> terminal-based package manager
> ii  base-files                           5.9                        Debian
> base system miscellaneous files
> ii  binutils                             2.20.1-15                  The GNU
> assembler, linker and binary utilities
> ii  build-essential                      11.4
> Informational list of build-essential packages
> ii  busybox                              1:1.10.2-2                 Tiny
> utilities for small and embedded systems
> ii  bzip2                                1.0.5-6
> high-quality block-sorting file compressor - utilities
> ii  coreutils                            6.10-6                     The GNU
> core utilities
> ii  cpio                                 2.9-13lenny1               GNU cpio
> -- a program to manage archives of files
> ii  cpp                                  4:4.3.2-2                  The GNU C
> preprocessor (cpp)
> ii  cpp-4.3                              4.3.2-1.1                  The GNU C
> preprocessor
> ii  debconf                              1.5.24                     Debian
> configuration management system
> ii  debconf-i18n                         1.5.24                     full
> internationalization support for debconf
> ii  debian-archive-keyring               2010.08.28~lenny1          GnuPG
> archive keys of the Debian archive
> ii  debian-faq                           4.0.4                      The Debian
> FAQ
> ii  debianutils                          2.30
> Miscellaneous utilities specific to Debian
> ii  dpkg                                 1.15.8.5                   Debian
> package management system
> ii  dpkg-dev                             1.15.8.5                   Debian
> package development tools
> ii  fakeroot                             1.14.4-1                   Gives a
> fake root environment
> ii  g++                                  4:4.3.2-2                  The GNU
> C++ compiler
> ii  g++-4.3                              4.3.2-1.1                  The GNU
> C++ compiler
> ii  gcc                                  4:4.3.2-2                  The GNU C
> compiler
> ii  gcc-4.2-base                         4.2.4-6                    The GNU
> Compiler Collection (base package)
> ii  gcc-4.3                              4.3.2-1.1                  The GNU C
> compiler
> ii  gcc-4.3-base                         4.3.2-1.1                  The GNU
> Compiler Collection (base package)
> ii  gcc-4.4-base                         4.4.5-2                    The GNU
> Compiler Collection (base package)
> ii  git                                  1:1.7.1-1.1                fast,
> scalable, distributed revision control system
> ii  initramfs-tools                      0.92o                      tools for
> generating an initramfs
> ii  initscripts                          2.86.ds1-61                Scripts
> for initializing and shutting down the system
> ii  installation-report                  2.38                       system
> installation report
> ii  intltool-debian                      0.35.0+20060710.1          Help i18n
> of RFC822 compliant config files
> ii  kernel-package                       12.036                     A utility
> for building Linux kernel related Debian packages.
> ii  klibc-utils                          1.5.12-2                   small
> utilities built with klibc for early boot
> ii  libc-bin                             2.11.2-6                   Embedded
> GNU C Library: Binaries
> ii  libc-dev-bin                         2.11.2-6                   Embedded
> GNU C Library: Development binaries
> ii  libc6                                2.11.2-6                   Embedded
> GNU C Library: Shared libraries
> ii  libc6-dev                            2.11.2-6                   Embedded
> GNU C Library: Development Libraries and Header Files
> ii  libc6-i686                           2.11.2-6                   Embedded
> GNU C Library: Shared libraries [i686 optimized]
> ii  libdevmapper1.02.1                   2:1.02.27-4                The Linux
> Kernel Device Mapper userspace library
> ii  libgcc1                              1:4.3.2-1.1                GCC
> support library
> ii  libgcrypt11                          1.4.5-2                    LGPL
> Crypto library - runtime library
>     libglib2.0-0                         2.16.6-3                   The GLib
> library of C routines
> ii  libstdc++6                           4.4.5-2                    The GNU
> Standard C++ Library v3
> ii  libstdc++6-4.3-dev                   4.3.2-1.1                  The GNU
> Standard C++ Library v3 (development files)
> ii  libsys-hostname-long-perl            1.4-2                      Figure out
> the long (fully-qualified) hostname
> rc  libsysfs2                            2.1.0-5                    interface
> library to sysfs
> ii  libusb-0.1-4                         2:0.1.12-13                userspace
> USB programming library
> ii  linux-image-2.6-686                  2.6.26+17+lenny1           Linux 2.6
> image on PPro/Celeron/PII/PIII/P4
> ii  linux-image-2.6.26-2-686             2.6.26-25lenny1            Linux
> 2.6.26 image on PPro/Celeron/PII/PIII/P4
> ii  linux-image-2.6.35.7.1023            10.00.ppsCustom            Linux
> kernel binary image for version 2.6.35.7.1023
> ii  linux-libc-dev                       2.6.26-25lenny1            Linux
> support headers for userspace development
> ii  make                                 3.81-5                     The GNU
> version of the "make" utility.
> ii  makedev                              2.3.1-88                   creates
> device files in /dev
> ii  module-init-tools                    3.4-1                      tools for
> managing Linux kernel modules
> ii  pciutils                             1:3.0.0-6                  Linux PCI
> Utilities
> ii  portmap                              6.0-9                      RPC port
> mapper
> ii  procps                               1:3.2.7-11                 /proc file
> system utilities
> ii  udev                                 0.125-7+lenny3             /dev/ and
> hotplug management daemon
> ii  usbutils                             0.73-10lenny2              Linux USB
> utilities
> ii  util-linux                           2.17.2-3.3
> Miscellaneous system utilities
> ii  xz-utils                             4.999.9beta+20100810-1     XZ-format
> compression utilities
> ii  zlib1g                               1:1.2.3.3.dfsg-12
> compression library - runtime
> ii  zlib1g-dev                           1:1.2.3.3.dfsg-12
> compression library - development

===================== end more config =======================

Since the ktimer source works well and others have had success with the
Garmin 18LVC, I¹m guessing that I¹ve got something mis-configured or USB
serial converters (at least the ones I have) aren¹t supported by linuxpps.

Any help you can provide would be gratefully received.
Again, many thanks for maintaining linuxpps.

Cheers,
Kent Headley

----------------------------------------------------------
Platforms Engineering Group Lead
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, CA 95039
 
Tel: 831-775-1822
Email: headley at mbari.org




------ End of Forwarded Message

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ml.enneenne.com/pipermail/linuxpps/attachments/20101027/f3c036b9/attachment-0001.htm 


More information about the LinuxPPS mailing list