gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No PPS from gpsd


From: Jim Pennino
Subject: Re: No PPS from gpsd
Date: Thu, 29 Jul 2021 18:21:46 +0000 (UTC)



On Thursday, July 29, 2021, 10:51:19 AM PDT, Gary E. Miller <gem@rellim.com> wrote:


Yo Jim!

On Thu, 29 Jul 2021 14:01:07 +0000 (UTC)
Jim Pennino <penninojim@yahoo.com> wrote:

> Using Ubuntu 20.04.2 and gpsd 3.20.

3,20 is a tad old, and has a fatal bug appearing on October 23, 2021



That is the current Ubuntu release.

> I replaced the long running USB GPS with a RS-232 device,
> reconfigured and rebooted.

Would be nice to know how you reconfigured.  The devil is in the details.


USBAUTO="false"
DEVICES="/dev/ttyS4 "
GPSD_OPTIONS="-n -b -s9600 "
GPSD_SOCKET=/var/run/gpsd.socket


> NMEA data is just fine and ppscheck works but gpsd is not processing
> the PPS signal on CTS.

Did you use "-D 4" with gpsd?  That is the best way to debug PPS.

As gpsd only logs to syslog, I did not do that as setting syslog to debug will fill with messages from everything on the system. IMHO gpsd should have an option to set the logging facility to something quieter such as usr1.

> ppstest and ppswatch fail

Fail how?


ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
time_pps_fetch() error -1 (Connection timed out)
^C

ppswatch /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
time_pps_fetch() error -1 (Connection timed out)
time_pps_fetch() error -1 (Connection timed out)
^C


> xgps does not show PPS,

I assume you mean in the JSON window?

Correct.

> and ntpshmmon
> shows only NTP0, i.e. not NTP1 and NTP2 as one would expect.

And what exactly does NT0 show?

ntpshmmon
ntpshmmon: version 3.20
#      Name Seen@                Clock                Real                 L Prc
sample NTP0  1627582358.001998578  1627582358.001171629  1627582357.999663911 0 -20
sample NTP0  1627582359.001888547  1627582359.001666429  1627582358.999662768 0 -20
sample NTP0  1627582360.001972789  1627582360.001620483  1627582359.999661625 0 -20
^C

> I ran gpsd as a regular user

gpsd can not do KPPS as a regular user.  The man page states to run gpsd
as root or lose functionality.

> with -D3 -N to look for errors but it
> looked OK and was accepting PPS.

PPS, but not KPPS.  You lost functionality running as a plain user.

Yes, I know. At this point my only interest was in seeing if CTS was actually being seen.

> ntpshmmon showed NTP2 and NTP3 and

Which is not what you want, but normal when running as a normal user.

> xgps did show PPS. So the problem is not the hardware.

Agreed.

> Guessing it was some sort of permissions issue I had introduced over
> the years,

The one thing you did not share was how you start gpsd as root.  I'm
guessing that is your problem.

systemd

> I did an apt purge gpsd, apt install gpsd and started
> fresh with a reboot.
>
> No change.

Oh.  So you are running under systemd(umb) and forgot to change your
config after re-install.

Verify by runnng gpsdebuginfo from here:

https://gpsd.io/gpsdebuginfo

Will do that later; send the output to who exactly?

> Thinking maybe apparmor was doing something, I stopped it and did a
> teardown.

Always a good idea to shoot AppArmor in the head.

> No change.
>
> /etc/default/gpsd contains:
> USBAUTO="false"
> DEVICES="/dev/ttyS4 /dev/pps0"

Wrong.  Just specify /dev/ttyS4.  If you have /dev/pps0 before starting
gpsd then gpsd can not create /dev/pps0 and things go bad.

I have actually removed that.

> # Other options you want to pass to gpsd
> GPSD_OPTIONS="-n -b -s9600 "

Why -b?  You are not running on bluetooth.

Because the gpsd documentation says it is read-only mode, not that it is read-only mode only for USB and bluetooth.


> Now I have no clue where to go next...


Shoot systemd(umber) in the head.

Who is going to pay me to rewrite Ubuntu?


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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]