[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: |
Mon, 9 Sep 2019 21:25:35 -0700 |
Yo Daniel!
On Tue, 10 Sep 2019 12:54:52 +0930
"O'Connor, Daniel" <address@hidden> wrote:
> > On 10 Sep 2019, at 12:13, Gary E. Miller <address@hidden> wrote:
> >>
> >> My reading of the NTP NMEA refclock code suggests that it will
> >> attempt to use /dev/gpspps0 to go with /dev/gps0 since flag1 is 1.
> >>
> >
> > Uh, that is NTP, this is gpsd. Different projects.
>
> Yes I know, I wanted to demonstrate (to myself mostly) that the GPS
> engine & PPS capture are working properly before adding GPSd into the
> mix.
It is hard to follow you if you are not saying when you jump from
project to project...
> >> [ Note that I forgot to mention in my original email that I have a
> >> symlink from /dev/gpspp0 to the device capture device /dev/dmtpps
> >> ]
> >
> > None are device names that I recognize. Why did you do that?
>
> That's what ntpd wants.
Luckily gpsd is beyond magic names and numbers.
> >>>> And it all looks good:
> >>>
> >>> Not really. Your NTP is not using the SHM(0). Which is a good
> >>> thing. It should be using your SHM(1), your PPS.
> >>
> >> I think NTP must be using PPS otherwise the jitter would be much
> >> higher.
> >
> > Your ntpmon showed that you were NOT using the local time from
> > gpsd!
>
> Yes, as above.
The ntpmon showed your system was not using local NTP either. So you
still have not shown your PPS works with NTP.
> >> Sure, it was done to produce logging to demonstrate the issue, and
> >> given it should be using the kernel for PPS edge capture I think it
> >> wouldn't have an effect.
> >
> > Well, the logging demonstrated it was NOT using KPPS. Nor
> > TIOMCIWAIT PPS. So no PPS at all.
>
> You seem to be missing the point that it is trying to do
> time_pps_create on a file descriptor set to -2 which is not a valid
> FD.
You are missing the point the -2 is not an FD, it is an error code from
an eariler failure.
> > You misunderstand the failure. Always look at the First Failure
> > (FF).
>
> The "first failure" I can see in GPSd output is:
> gpsd:INFO: KPPS:/dev/pps0 time_pps_create(-2) failed: Bad file
> descriptor
Nope. See above. -2 is not a legal file descriptor, so the error
is earlier when the error code was not caught.
> The "Bad file descriptor" is because it is trying to do an ioctl on
> -2.
Yes! But the First Failure, the thing that returned an FD of -2, is
the root problem.
> >> I don't have ppscheck and I am not sure what it does. ppsapitest
> >> just opens the given device and captures edges and logs the
> >> result.
> >
> > ppscheck check comes with gpsd. We are talking about gpsd, so you
> > must have it. If not, your gpsd install is bad.
>
> ppscheck doesn't build:
And, looking at it, scons knows that. I thought that had been fixed...
> >> http://www.dons.net.au/~darius/gpsd-build.log
> >
> > Checking for C header file sys/timepps.h... yes
> > Checking if sys/ioctl.h supplies TIOCMIWAIT... no
> >
> > As expected, you have KPPS, but not TIOCMIWAIT. But when you ran
> > gpsd the KPPS failed.
>
> It failed to do either TIOCMIWAIT or time_pps_create because FreeBSD
> doesn't support the former and it called the later on an FD of -2.
Yes, no need to keep mentioning TIOMCIWAIT, we all know it does not
work on the *BSDs. And the FD of -2 is after the first failure.
> My question remains: Why is it setting that FD to -2 then trying to
> do operations on it?
Because -2 is an error return to an earlier system call. That is the
first failure. Look at the code that returned the FD.
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
pgpOTJSsS1HMN.pgp
Description: OpenPGP digital signature
- Re: [gpsd-dev] GPSd on FreeBSD, (continued)
- Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/12
- Re: [gpsd-dev] GPSd on FreeBSD, Gary E. Miller, 2019/09/12
- Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/13
- Re: [gpsd-dev] GPSd on FreeBSD, Gary E. Miller, 2019/09/10
- Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/12
Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/09
- Re: [gpsd-dev] GPSd on FreeBSD, Gary E. Miller, 2019/09/09
- Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/09
- Re: [gpsd-dev] GPSd on FreeBSD,
Gary E. Miller <=
- Re: [gpsd-dev] GPSd on FreeBSD, O'Connor, Daniel, 2019/09/10
- Re: [gpsd-dev] GPSd on FreeBSD, Gary E. Miller, 2019/09/10