gpsd-users
[Top][All Lists]
Advanced

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

Re: GPSD Not Using /dev/pps0 But ppstest Shows /dev/pps0 is OK


From: Joshua Quesenberry
Subject: Re: GPSD Not Using /dev/pps0 But ppstest Shows /dev/pps0 is OK
Date: Wed, 2 Dec 2020 12:41:42 -0500

For the purposes of this discussion the startup script just launches gpsd as root, we have a sequential set of scripts that run under one systemd startup target.

The distribution is Raspbian Buster and we have a customized kernel running optimized for low-latency.

I can add the "-n" if you think it will help, but this has been running for over a year without a need for it. The "-r" is so we use the GPS time even without a fix, this is because our GPS has a built-in real-time clock that is kept alive that we were try to leverage, but that hasn't been the best design choice, dedicated real-time clock next time.

I have GPSD connecting to a Python script that outputs the GPS feed over a TCP connection. GPSD is only acting as a listener and cannot send packets back to the GPS. The Python scripts is the single master setting up the device and doing some other useful tasks. Different use case than most GPSD users, but definitely working well for us for over a year.

Note that the device is sitting on my desk at work right now, we have a GPS repeater setup for indoor testing. Yes it has 3D fix. Here's a sample output from gpsmon.

tcp://127.0.0.1:5760          NMEA0183>
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkor":12}
xTime: 2020-12-02T17:29:33.500Z Lat:  36 11' 18.04818" Non:  81 23' 47.07803" Wx60","driver":"NMEA0183","activated":"2020-12-02T17:28:59.424Z","flags":1}]}
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq Cooked TPV qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjfalse,"timing":false,"split24":false,"pps":true}
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x GNRMC GNVTG GNGGA GNGSA GPGSV GLGSV GNGLL                                    x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq Sentences qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
lqqqqqqqqqqqqqqqqqqklqqqqqqqqqqqqqqqqqqqqqqqqqqqqklqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
xCh PRN  Az El S/N xxTime:      172933.50        xxTime:      172933.50        x
x 0   1 324  9  19 xxLatitude:    3611.30803 N   xxLatitude:  3611.30803       x
x 1  10 117 77  29 xxLongitude:  08123.79634 W   xxLongitude: 08123.79634      x
x 2  12  79 25  22 xxSpeed:     0.264            xxAltitude:  651.5            x
x 3  18 172  0   0 xxCourse:                     xxQuality:   1   Sats: 10     x
x 4  20 139 39  26 xxStatus:    A       FAA: A   xxHDOP:      0.92             x
x 5  21 306 22  24 xxMagVar:                     xxGeoid:     -33.4            x
x 6  23 130 43  27 xmqqqqqqqqqqq RMC qqqqqqqqqqqqjmqqqqqqqqqqq GGA qqqqqqqqqqqqj
x 7  24  46 15  18 xlqqqqqqqqqqqqqqqqqqqqqqqqqqqqklqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x 8  25 123 29  19 xxMode: A3 ...s: 1 10 12 20 2 xxUTC:           RMS:         x
x 9  31 215 33  24 xxDOP: H=0.92  V=1.48  P=1.74 xxMAJ:           MIN:         x
x10  32 318 62  26 xxTOFF: -0.018783164          xxORI:           LAT:         x
x11 131 231 32   0 xxPPS:                        xxLON:           ALT:         x
mqqqqqq GSV qqqqqqqjmqqqqqqqq GSA + PPS qqqqqqqqqjmqqqqqqqqqqq GST qqqqqqqqqqqqj
(42) $GNGSA,A,3,,,,,,,,,,,,,1.74,0.92,1.48*18
(68) $GPGSV,4,1,14,01,09,324,19,10,77,117,29,12,25,079,23,18,00,172,*77
(70) $GPGSV,4,2,14,20,39,139,26,21,22,306,24,23,43,130,27,24,15,046,18*75
(68) $GPGSV,4,3,14,25,29,123,19,31,33,215,25,32,62,318,26,44,32,231,*76
(40) $GPGSV,4,4,14,46,24,242,,51,38,220,*73
(18) $GLGSV,1,1,00*65
(52) $GNGLL,3611.30803,N,08123.79631,W,172933.20,A,A*65

Regarding the version, as mentioned we used whatever was latest on apt. We avoid having to checkout and build 3rd party software as much as possible. If we find here that upgrading to a newer GPSD version is required then I can broach the topic with others, but for now if we can keep it at 3.17 that would be most ideal. I don't know who builds the packages for apt, I would hope it's someone in this group, but generally people are going to do a simple `apt install gpsd` before they start pulling down repo's and building stuff from scratch. Not sure why the maintainer of the apt package deviated from the defaults, I'm not even sure how they defer from what I've got installed.

I don't know if it matters or not with regards to ntpshmmon, but we don't have any of the ntp stuff installed on our system and aren't planning to install it. I would think not having ntp would have no affect on the PPS field in gpsmon, but I could be mistaken.

Thanks,

Josh Q

On Wed, Dec 2, 2020 at 12:07 PM Gary E. Miller <gem@rellim.com> wrote:
Yo Joshua!

On Wed, 2 Dec 2020 11:24:16 -0500
Joshua Quesenberry <engnfrc@gmail.com> wrote:

> I'm running GPSD on an RPi 4. I have GPSD pulling in the GPS data over
> serial without any issues. Now I'm trying to pull in to the PPS
> signal that is on GPIO 6.

A common thing to do.  I assume you read the HOWTO on that?

Where did you get your gpsd from?  Was it build with MAGIC_HAT?

> I've added to /boot/config.txt the line:
> `dtoverlay=pps-gpio,gpiopin=6` and appended to /etc/modules line
> `pps-gpio`

You do not need to modify /etc/modules.  The dteoverlay= already brings
in the pps-gpio module.

> and now after a reboot I see pps_gpio and pps_core loaded.

And what does dmesg say about it?

> Using command `sudo ppstest /dev/pps0` I see this output, which
> confirms to me that /dev/pps0 is in fact my PPS signal coming into
> the RPi.
>
> trying PPS source "/dev/pps0"
> found PPS source "/dev/pps0"
> ok, found 1 source(s), now start fetching data...
> source 0 - assert 1606924323.767119450, sequence: 205 - clear
> 0.000000000, sequence: 0

Good.  At least considering the poor pps-gpio module...

> I then modified my GPSD startup script

Uh, what gpsd startup script?  For what distro?

> such that now when the app is
> running I see this process: `/usr/sbin/gpsd -r tcp://127.0.0.1:5760
> /dev/pps0`

That look wrong.  No "-n", extra "-r", and what is tcp://127.0.0.1:5760?

Running as root?

> Now from what I can tell reading around in the documentation gpsmon
> should have something showing in the PPS field and ntpshmmon should
> be outputting something, however both the PPS field is empty and
> ntpshmmon isn't outputting anything at all.

Not surprising, given your odd configuration.

Does gpsmon sow a 3D fix?  And a good location?

> Can someone give me guidance on the next steps?
>
> Version Information:
> gpsd: 3.17 (revision 3.17)

3.17 is really old.  UPdate to 3.21 or git head.

> # Socket export enabled.
> # Shared memory export enabled.
> # DBUS export enabled
> # Time service features enabled.
> # PPS enabled.

Any reason you did not go with the gpsd build defaults?

> Note that this gpsd binary was provided through the apt package.

Then not from us, gpsd does not distribute any packages.  What distro?
So we can't patch it.

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]