gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] GPSd on FreeBSD


From: Gary E. Miller
Subject: Re: [gpsd-dev] GPSd on FreeBSD
Date: Thu, 12 Sep 2019 12:43:42 -0700

Yo Daniel!

On Thu, 12 Sep 2019 13:39:38 +0930
"O'Connor, Daniel" <address@hidden> wrote:

> > On 11 Sep 2019, at 06:03, Gary E. Miller <address@hidden> wrote:  
> >> I also see the MAGIC_HAT_ENABLE kludge - I ran sons like:
> >> scons debug=true magic_hat=true  
> > 
> > Yes, kudlge.  For one purpose; 1st time Raspberry Pi users that
> > can't figure out how to use the command line.  
> 
> That seems a little condescending and unhelpful to be honest.

Sorry if you missed my point.  Not relevant to the discussion.

> > I'm not about to extend the kludge, I want to kill it off.  Just put
> > "/dev/pps0" on your gpsd command line.  
> 
> I tried that first, it doesn't work:

Works for me.  I do it on more than half a dozen RasPi's in my test rack.
Plus a bunch of other test servers.

Not sure why it does not work for you.  *BSD do their own thing.

> > If I run gpsd like so..
> > sudo ./gpsd -D5 -NnG /dev/gps0 /dev/pps0
> > I get..
> > gpsd:PROG: selecting PPS driver...
> > gpsd:PROG: PPS:/dev/pps0 chrony socket /var/run/chrony.pps0.sock
> > doesn't exist
> gpsd:INFO: KPPS:/dev/pps0 RFC2783 path:/dev/pps0, fd is -2

Yes, as previsously discussed.  Someone needs to look into why that
fails for you.  I don't have you distro, so can only guess.

Note the code in ppsthread.c new line 337 that notes *BSD do things
differently than other distros.  It does appear to break the use
of /dev/pps0 on *BSD.  It also seems to miss a lot of the special
cases the linux code handles.  Someone that knows your *BSD will have
to fix that branch.

What error is -2 on your distro?

> /dev/gps0 points to /dev/cuau2
> /dev/pp0 points to /dev/dmtpps0

Yes, as previously discussed.

> >> Full log at: http://www.dons.net.au/~darius/gpsd-2.log  
> > 
> > No PPS at all in that log.  So not relevant to our PPS discussion.  
> 
> There are plenty of messages about PPS, just that after init they all
> say: gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Operation timed out

Sorry, they are unusually far down, I missed them.  The results do not
look like your earlier ones:

gpsd:INFO: KPPS:/dev/pps0 RFC2783 path:/dev/pps0, fd is 5
gpsd:INFO: KPPS:/dev/pps0 pps_caps 0x1133
gpsd:INFO: KPPS:/dev/pps0 have PPS_CANWAIT
gpsd:INFO: KPPS:/dev/pps0 kernel PPS will be used
gpsd:PROG: PPS:/dev/pps0 thread launched
gpsd:INFO: PPS:/dev/gpsd0 ntpshm_link_activate: 1

In that case, fd == 5, but then timeouts:

gpsd:INFO: KPPS:/dev/pps0 kernel PPS timeout Operation timed out

I have no clue why your distro fails, and no way to test on my end.

The "#ifdef __linux__" on line 238 of ppsthread.c, very near the -2 error,
shows the *BSD path is very different.  Not knowing *BSD I can't say
what needs to get fixed.

> If I put both /dev/cuau2 and /dev/dmtpps0 on the command line I see
> it get timeouts for cuau2 but work for dmtpps:

Is it possible the link /dev/gps0 to /dev/cuau2 is confusing things?

Since it works further, I would stop using the gps0 link and use 
cuau2.

> KPPS:/dev/dmtpps assert  1568261257.999806732, sequence: 266942,
> clear   0.000000000, sequence: 0 - using: assert

That is a good timestamp.

> gpsd:PROG: PPS:/dev/dmtpps Assert ignored missing last_fixtime

That says your NMEA has not reported valid time yet.  What happens if you
wait 30 mins?  (For leap seconds in the almanac).

> However after a little while it seems to give up on dmtpps (I guess
> because it's not producing any actual GPS messages):

No, this is why it does not use the KPPS:

> gpsd:PROG: PPS:/dev/dmtpps Assert ignored missing last_fixtime

This is something else, not sure what:

> gpsd:PROG:
> KPPS:/dev/dmtpps descriptor cleaned up gpsd:PROG: PPS:/dev/dmtpps
> gpsd_ppsmonitor exited.


> So I guess that is why the kludge for the Pi Hat is there - to allow
> you to fuse the two devices into one.

Sorry, apples and oranges.  The RasPi works just fine w/o the MAGIC_HAT
kludge.  It is just a "convenience" that confused people.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpWluiUM6ZQz.pgp
Description: OpenPGP digital signature


reply via email to

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