[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trouble w/ PPS from a Trimble
From: |
Gary E. Miller |
Subject: |
Re: Trouble w/ PPS from a Trimble |
Date: |
Thu, 1 Sep 2022 21:16:23 -0700 |
Yo Phil!
On Thu, 1 Sep 2022 18:23:44 +0000
Phil Freeman <Freeman_Philip@cat.com> wrote:
> I have a Trimble GPS w/ PPS connected to a Linux machine and want to
> get the GPS time into chrony.
Should be easy.
> I'm following the gpsd-time-service-howto but running into trouble.
> The GPS is hooked up to /dev/ttyS4 and the PPS signal line is wired
> to the CTS pin on said port. (Our serial port doesn't have a DCD pin
> apparently.) It seems like ppscheck sees the signal:
That's OK.
Did you level convert the Trimble to the right voltage levels?
> $ sudo /usr/local/bin/ppscheck /dev/ttyS4
sudo is bad for your health:
https://gpsd.io/ubxtool-examples.html#_sudo_sudont
> WARNING: time_pps_create(/dev/ttyS4)) failed: Operation not
> supported(95) WARRING: /dev/ttyS4 does not appear to be a KPPS device
That's not OK.
> INFO: matching /dev/pps2 opened
>
> # Src Seconds Signals
>
> KPPS 0.000000000 assert 0
> KPPS 0.000000000 clear 0
> TTY 1661991360.907304952 TIOCM_CD TIOCM_DSR TIOCM_CTS
>
> TTY 1661991361.907284335 TIOCM_CD TIOCM_DSR TIOCM_CTS
>
> TTY 1661991362.907276970 TIOCM_CD TIOCM_DSR TIOCM_CTS
>
> TTY 1661991363.907272325 TIOCM_CD TIOCM_DSR TIOCM_CTS
>
> TTY 1661991364.907267204 TIOCM_CD TIOCM_DSR TIOCM_CTS
>
> TTY 1661991365.907261056 TIOCM_CD TIOCM_DSR TIOCM_CTS
>
> TTY 1661991366.907233244 TIOCM_CD TIOCM_DSR TIOCM_CTS
Odd. You did that before starting gpsd, right?
> but gpsd / gpsmon doesn't seem to see the signal :-/
gpsmon is for developers, it is for direct hardware access and bypasses
most of gpsd. Use cgps insead of gpsmon.
> $ sudo /usr/local/sbin/gpsd -s 115200 -n /dev/ttyS4 -N -D1
> gpsd:WARN: __STDC_IEC_599__ is missing
Not good at all.
> gpsd:WARN: NMEA0183: can't use GGA time until after ZDA or RMC has
> supplied a year. gpsd:WARN: NMEA0183: can't use GGA time until after
> ZDA or RMC has supplied a year. gpsd:WARN: PPS:/dev/ttyS4 unchanged
> state, ppsmonitor sleeps 10 gpsd:WARN: PPS:/dev/ttyS4 unchanged
> state, ppsmonitor sleeps 10
We need a LOT longer and more complete debug output to know anything.
Maybe -D4 for a minute or more.
> tcp://localhost:2947 NMEA0183>
gpsmon is of no use in debugging user problems in gpsd.
What does ntpshmmon show you?
> $ sudo /usr/local/bin/ppscheck /dev/pps2
> INFO: ioctl(/dev/pps2, TIOCMGET) failed: Inappropriate ioctl for
> device(25) INFO: /dev/pps2 does not appear to be a tty
> INFO: kpps_caps 0x1133
> PPS_CAPTUREASSERT
> PPS_CAPTURECLEAR
> PPS_CAPTUREBOTH
> PPS_OFFSETASSERT
> PPS_OFFSETCLEAR
> PPS_CANWAIT
> PPS_TSFMT_TSPEC
The first ppscheck showed no KPPS, and the one above does. Strange...
Except it also fails.
> # sh ./gpsdebuginfo
> + id -u
> + [ 0 != 0 ]
> + [ -n 1 ]
> + echo sudo will confuse the results.
> sudo will confuse the results.
You did read the output before sending it to us, right? The line
above was a hint to you.
> + gpsd -V
> gpsd: 3.24 (revision 3.24)
Good.
> + ls -l /dev/pps0 /dev/pps1 /dev/pps2 /dev/ttyS0 /dev/ttyS1
Why do you have so many pps devices? Did you look at them all?
> + aa-status
> apparmor module is loaded.
Not good.
> /usr/sbin/chronyd
> /usr/sbin/gpsd
Even worse.
> Caterpillar: Confidential Green
Uh, what?
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin
pgpXFkSZNpAqo.pgp
Description: OpenPGP digital signature