gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] syslog error message with new version - kernel PPS fail


From: Gary E. Miller
Subject: Re: [gpsd-users] syslog error message with new version - kernel PPS failed Connection timed out
Date: Wed, 5 Aug 2015 14:44:40 -0700

Yo hans!

On Wed, 05 Aug 2015 23:27:32 +0200
hans mayer <address@hidden> wrote:

> For easy reading I pick out the relevant parts.
> I hope this is convenient.

Except you tend to remove relevant parts!

>  > But you fail to mention how you enabled /dev/pps0.
> 
> I put a line with "pps-gpio" into /etc/modules
> and file /etc/modprobe.d/pps-gpio.conf has:
> options pps-gpio gpio_pin=18
> and after a reboot it was there and available for ppstest

OK.  Be aware that driver can only use one edge...

>  >> and NTP also working fine with PPS/ATOM support 127.127.22.0
>  > Using what config?
> 
> # Enabling PPS/ATOM support
> server 127.127.22.0 minpoll 5 maxpoll 6
> fudge 127.127.22.0 refid PPS time1 -0.0053
> fudge 127.127.22.0 flag3 1  # enable kernel PLL/FLL clock discipline
> 
> # gpsd shared memory clock
> server 127.127.28.0 minpoll 5 maxpoll 6 prefer  # PPS requires at
> least one preferred peer
> fudge 127.127.28.0 refid GPS
> fudge 127.127.28.0 time1 +0.110  # coarse processing delay offset

Uh, don't do that!  See the gpsd time server howto for how to use SHM
instead of having ntpd directly access the GPS.

>  >> And how ?
>  > By opening /dev/pps0
> 
> hmm ??
> I thought NTP is doing this.

No.  Please read the gpsd time service howto.

The ntpd driver for atom/gps is pretty primitive.  If you insist on doing
it this way then gpsd can not access the PPS, KPPS or GPS since ntpd has 
already opened those devices.

> But obviously there are at least 2 methods to do it.

Obviously.

> But this error message is also coming without running NTP.
> So it's not a thing of "you are not allowed because I do"

Which would be the bases for a different thread.  let us not try
to do two things at once.

>  > And your confusion is?
> 
> The error message itself: ERROR: KPPS:/dev/ttyS2
> What has ttyS2 to do with kernel PPS ?

They are both connected to the GPS, and gpsd needs both of them to 
access the GPS time.  But you already configured ntpd to grab those
resources.

> ttyS2 is RxData pin and the kernel PPS is generated in my case out of
> GPIO pin 18, which is a different pin.

Correct.  And the gpsd time service howto will tell you how to associate
them.

> So how to interpret this message: ERROR: KPPS:/dev/ttyS2 ?

That you can do better.  gpsd is not getting KPPS time, which shoould
be obvious since you told ntpd to manage the GPS.  That is a bad plan.

>  > Since gpsd is outputting the KPPS error you obviously built with
>  > pps=yes.
> 
> This is the default. So the answer is yes.

Yes.

>  >> The 1PPS is directly managed by the ntp daemon itself.
>  > It can be, but that is not the best way.
>  > The best way is to have gpsd do it.
> 
> Ok, this doesn't contradict the information I found, but is
> slightly different.
> Originally I run a programm called "rpi_gpio_ntp". Maybe you know it.
> It reads the GPIO pin and writes to shared memory.
> I read this is not an optimum as this task runs in user space ( as
> it is the same with "gpsd" ) and generated an additional jitter.
> It's better NTP reads directly the KPPS.

Yes, sub optimal, only for testing and historical interest.

> This is what I have seen. Maybe not true.

Yes, true, and not relevant to the current problem.

>  > If you are in fact telling ntpd to open /dev/pps0 then that
>  > perfectly explains why gpsd can not open /dev/pps0.
> 
> Partly not. As I said, even if "ntpd" is NOT running I have this
> error.

Yes, because you have not told gpsd how to access the /dev/pps0, or
it has permissions that do not allow gpsd to read it.  You need to
follow the gpsd time service howto to configure your setup.

Just for debugging purposes: 

How are you starting gpsd?  

You are starting gpsd as root, right?

What are the permissions on your /dev/pps0?

>  > Read the gpsd time service howto for the preferred configuration.
> 
> I found your page weeks ago. Thanks, very useful.
> And I run the NTP configuration you mentioned in this doc.

Good.

> But - as I said - I used "rpi_gpio_ntp". Very obviously I didn't have
> success with having this error.

You can not have followed the time service howto and used rpi_gpio_ntp
at the same tim. rpi_gpio_ntp is suboptimal and only usefull for testing
and historical interest.

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

Attachment: pgppTX0Vbio6k.pgp
Description: OpenPGP digital signature


reply via email to

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