[ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-17 Thread David Taylor
I'm seeing behaviour on rebooting a Raspberry Pi Linux system which is 
stopping the PPS signal getting through to NTP.  It seems that the GPS 
device does not emit any pulses on the PPS line for some time after it 
has been powered up.  This I understand and it's the time taken for a 
good enough lock to be acquired.


However, it seems that if the PPS part of the kernel hasn't seen a 
transition, it does not create the pps device at least until the first 
transition is seen.  The delay seems to be some 133 seconds here:


$ dmesg | grep pps

[ 12.797224] pps_core: LinuxPPS API ver. 1 registered
[ 12.803850] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo 
Giome

tti 
[ 12.824858] pps pps0: new PPS source pps-gpio.-1
[ 12.832182] pps pps0: Registered IRQ 194 as PPS source
[ 133.043038] pps_ldisc: PPS line discipline registered
[ 133.044841] pps pps1: new PPS source acm0
[ 133.044879] pps pps1: source "/dev/ttyACM0" added

This seems to affect ntpd by it never seeing a response from the ATOM 
driver (but I am not 100% sure about this).  A reboot (i.e. with the GPS 
delivering PPS signals immediately) fixes the problem.


Does this seem possible, and how might it be fixed?
--
Thanks,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-17 Thread Uwe Klein

David Taylor wrote:
I'm seeing behaviour on rebooting a Raspberry Pi Linux system which is 
stopping the PPS signal getting through to NTP.  It seems that the GPS 
device does not emit any pulses on the PPS line for some time after it 
has been powered up.  This I understand and it's the time taken for a 
good enough lock to be acquired.


However, it seems that if the PPS part of the kernel hasn't seen a 
transition, it does not create the pps device at least until the first 
transition is seen.  The delay seems to be some 133 seconds here:




Does this seem possible, and how might it be fixed?


helps?:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=1970&start=150

uwe

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-17 Thread David Taylor

On 17/11/2012 21:57, Uwe Klein wrote:

David Taylor wrote:

I'm seeing behaviour on rebooting a Raspberry Pi Linux system which is
stopping the PPS signal getting through to NTP.  It seems that the GPS
device does not emit any pulses on the PPS line for some time after it
has been powered up.  This I understand and it's the time taken for a
good enough lock to be acquired.

However, it seems that if the PPS part of the kernel hasn't seen a
transition, it does not create the pps device at least until the first
transition is seen.  The delay seems to be some 133 seconds here:




Does this seem possible, and how might it be fixed?


helps?:
 http://www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=1970&start=150

uwe


Thanks, uwe, but I'm not sure that it does - perhaps I cannot see the 
wood for the trees!  I have seen that article before, but I am very new 
to Linux.  I /am/ seeing the PPS start, but it needs a reboot before NTP 
sees it.  Am I correct in thinking that the 133 seconds delay before 
"PPS line discipline registered" is significant in this problem?


Which part of the article or what keyword should I be looking for?
--
Thanks,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-18 Thread Uwe Klein

David Taylor wrote:

Which part of the article or what keyword should I be looking for?


UpFront: haven't played around with the raspberry yet.


My understanding was that your /dev/pps0 entry appeared too late.
( instantiated late by udev )

is the module "pps-gpio" loaded during system startup ?

lsmod ...

other ref:
https://github.com/davidk/adafruit-raspberrypi-linux-pps
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=9&t=1970

uwe

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-18 Thread David Taylor

On 18/11/2012 09:28, Uwe Klein wrote:

David Taylor wrote:

Which part of the article or what keyword should I be looking for?


UpFront: haven't played around with the raspberry yet.


My understanding was that your /dev/pps0 entry appeared too late.
( instantiated late by udev )

is the module "pps-gpio" loaded during system startup ?

lsmod ...

other ref:
 https://github.com/davidk/adafruit-raspberrypi-linux-pps
 http://www.raspberrypi.org/phpBB3/viewtopic.php?f=9&t=1970

uwe


Thanks, uwe.  I've been using the pages you list as a guide.

On a working (with PPS pulses) system:

cat /etc/modules contains "pps-gpio"

lsmod shows:

pps_ldisc used by: 2
pps_gpio used by: 1
pps_core used by: 4 pps_gpio,pps_ldisc


On a system with nothing connected to the PPS:

cat /etc/modules contains "pps-gpio"

lsmod shows:

pps_gpio used by: 0
pps_core used by: 1 pps_gpio


I'm unsure how to interpret the difference, or what pps_ldisc does.
--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-18 Thread David Woolley

David Taylor wrote:


I'm unsure how to interpret the difference, or what pps_ldisc does.


I would assume that pps_ldisc maps PPS events onto the serial port API. 
(Line discipline)


___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-18 Thread Uwe Klein

David Taylor wrote:

On 18/11/2012 09:28, Uwe Klein wrote:


David Taylor wrote:


Which part of the article or what keyword should I be looking for?



UpFront: haven't played around with the raspberry yet.


My understanding was that your /dev/pps0 entry appeared too late.
( instantiated late by udev )

is the module "pps-gpio" loaded during system startup ?

lsmod ...

other ref:
 https://github.com/davidk/adafruit-raspberrypi-linux-pps
 http://www.raspberrypi.org/phpBB3/viewtopic.php?f=9&t=1970

uwe



Thanks, uwe.  I've been using the pages you list as a guide.

On a working (with PPS pulses) system:

cat /etc/modules contains "pps-gpio"

lsmod shows:

pps_ldisc used by: 2
pps_gpio used by: 1
pps_core used by: 4 pps_gpio,pps_ldisc


On a system with nothing connected to the PPS:

cat /etc/modules contains "pps-gpio"

lsmod shows:

pps_gpio used by: 0
pps_core used by: 1 pps_gpio


I'm unsure how to interpret the difference, or what pps_ldisc does.


what happens if you "insmod pps_ldisc" into the "not ready" system?

you may need a call to ldattach afterwards:
http://net.its.hawaii.edu/network-performance/using-praecis/

"grep" your way through the udev scripts !?

uwe

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-19 Thread David Taylor

On 18/11/2012 14:17, David Woolley wrote:

David Taylor wrote:


I'm unsure how to interpret the difference, or what pps_ldisc does.


I would assume that pps_ldisc maps PPS events onto the serial port API.
(Line discipline)


OK, thanks.  Would that be the part of the code which detected a DCD 
change?  As DCD isn't used in this application (it's a separate GPIO 
pin) I suppose it doesn't matter here.

--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-19 Thread David Taylor

On 18/11/2012 15:20, Uwe Klein wrote:
[]

what happens if you "insmod pps_ldisc" into the "not ready" system?

you may need a call to ldattach afterwards:
 http://net.its.hawaii.edu/network-performance/using-praecis/

"grep" your way through the udev scripts !?

uwe


(1) I get Error: could not load pps_ldisc module: No such file or directory

(2) ldattach does not list the GPIO pin as one of its supported names.

I looked at the article you referenced, but in this case the Raspberry 
Pi is not using the DCD line, but a separate GPIO pin.  lsmod shows 
pps_gpio as present.

--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-19 Thread Miroslav Lichvar
On Mon, Nov 19, 2012 at 09:02:12AM +, David Taylor wrote:
> On 18/11/2012 15:20, Uwe Klein wrote:
> >what happens if you "insmod pps_ldisc" into the "not ready" system?
> 
> (1) I get Error: could not load pps_ldisc module: No such file or directory

insmod needs full path to the module, it's better to call "modprobe pps_ldisc".

> I looked at the article you referenced, but in this case the
> Raspberry Pi is not using the DCD line, but a separate GPIO pin.
> lsmod shows pps_gpio as present.

>From the original post it seems you have two pps devices, one for gpio
and the other for ldisc which is created two minutes later (some USB
device?).

Do you see two /dev/pps* devices and are you sure ntpd is using the
gpio one? Perhaps there is an ordering problem?

-- 
Miroslav Lichvar
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-19 Thread Uwe Klein

Miroslav Lichvar wrote:

On Mon, Nov 19, 2012 at 09:02:12AM +, David Taylor wrote:

(1) I get Error: could not load pps_ldisc module: No such file or directory



insmod needs full path to the module, it's better to call "modprobe pps_ldisc".

yup, sorry, my error.

uwe

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-19 Thread David Taylor

On 19/11/2012 09:44, Miroslav Lichvar wrote:

On Mon, Nov 19, 2012 at 09:02:12AM +, David Taylor wrote:

On 18/11/2012 15:20, Uwe Klein wrote:

what happens if you "insmod pps_ldisc" into the "not ready" system?


(1) I get Error: could not load pps_ldisc module: No such file or directory


insmod needs full path to the module, it's better to call "modprobe pps_ldisc".


I looked at the article you referenced, but in this case the
Raspberry Pi is not using the DCD line, but a separate GPIO pin.
lsmod shows pps_gpio as present.


 From the original post it seems you have two pps devices, one for gpio
and the other for ldisc which is created two minutes later (some USB
device?).

Do you see two /dev/pps* devices and are you sure ntpd is using the
gpio one? Perhaps there is an ordering problem?


Your help is much appreciated, folks!

On both systems, sudo modprobe pps_ldisc produces no output.

I have no idea which device ntpd is using, I simply have the type 22 
driver installed which, as I understood it, gets the accurate timestamp 
from the kernel.  How the kernel chooses which device to use I don't know.


In /dev I see pps0 on the system without a PPS signal connected, and 
pps0 and pps1 on the system /with/ the PPS signal active.  On the system 
/with/ the signal active, some 25 seconds in the dmes output I see: 
pps_ldisc registered (so ldisc does matter, I stand corrected), followed 
by pps1 new source, and source /dev/ttyAMA0 added.


So the issue appears to be that /dev/ttyAMA0 is not created until the 
GPS receiver is sending second pulses, and by that time ntpd is running 
and can't see the device.  Here are my lines from ntp.conf:


# Kernel-mode PPS ref-clock for the precise seconds
server 127.127.22.0 minpoll 4 maxpoll 4
fudge 127.127.22.0  flag3 1  refid PPS

I wonder whether I should be using 127.127.22.1 rather than .0?
--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-20 Thread Uwe Klein

David Taylor wrote:

I wonder whether I should be using 127.127.22.1 rather than .0?


probably.
but and before:
do you have the "pps-tools" package installed?

This guy seems to see your problem:
http://blog.retep.org/tag/raspberry-pi/

uwe

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-20 Thread Miroslav Lichvar
On Mon, Nov 19, 2012 at 06:03:06PM +, David Taylor wrote:
> On both systems, sudo modprobe pps_ldisc produces no output.

No message is a good message :).

> I have no idea which device ntpd is using, I simply have the type 22
> driver installed which, as I understood it, gets the accurate
> timestamp from the kernel. 

127.127.22.0 is /dev/pps0, 127.127.22.1 is /dev/pps1, ...

> How the kernel chooses which device to
> use I don't know.

With udev the order might be random. There could be a race between the
script which loads modules from /etc/modules and udev.

> In /dev I see pps0 on the system without a PPS signal connected, and
> pps0 and pps1 on the system /with/ the PPS signal active.  On the
> system /with/ the signal active, some 25 seconds in the dmes output
> I see: pps_ldisc registered (so ldisc does matter, I stand
> corrected), followed by pps1 new source, and source /dev/ttyAMA0
> added.

You can see what pps device is actually generating events with:
grep '' /sys/class/pps/pps*/{assert,clear}

> So the issue appears to be that /dev/ttyAMA0 is not created until
> the GPS receiver is sending second pulses, and by that time ntpd is
> running and can't see the device.  Here are my lines from ntp.conf:
> 
> # Kernel-mode PPS ref-clock for the precise seconds
> server 127.127.22.0 minpoll 4 maxpoll 4
> fudge 127.127.22.0  flag3 1  refid PPS
> 
> I wonder whether I should be using 127.127.22.1 rather than .0?

Perhaps. Do you use in ntpd the serial output from the GPS with some
driver like NMEA?

If you don't need the pps from /dev/ttyACM0, my suggestion would be to
prevent loading of the pps_ldisc module, so there is always only one
pps device. Any chance you added a udev rule to load pps_ldisc
automatically when the serial device is created? 

-- 
Miroslav Lichvar
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-20 Thread james machado
David,

running RPi with GPS+PPS here.

I compiled my own kernel and the one major gotcha I had was an RTFM
issue.  The kernel used on the RPi is not the compressed vmlinuz
kernel used on PC's.  I recompiled my kernel 10 times or more before I
went back scouring the 'net to find out the kernel in use was the
kernel.img file.  Reason I say this is the first time I thought I had
this working I was seeing kernel generated PPS signals and not GPS
generated PPS signals.  Life got much easier when I figured that out
:)

Having said all that this is what I see in my syslog when my system
restarts, my GPS has battery backup so it's not a cold start on it
when I reboot my RPi.

Nov 15 19:17:41 pisces kernel: [  102.192261] pps_core: LinuxPPS API
ver. 1 registered
Nov 15 19:17:41 pisces kernel: [  102.192269] pps_core: Software ver.
5.3.6 - Copyright 2005-2007 Rodolfo Giometti 
Nov 15 19:17:41 pisces kernel: [  102.195682] pps_core: source
pps-gpio.-1 got cdev (251:0)
Nov 15 19:17:41 pisces kernel: [  102.195702] pps pps0: new PPS source
pps-gpio.-1
Nov 15 19:17:41 pisces kernel: [  102.195745] pps pps0: Registered IRQ
194 as PPS source
Nov 15 19:17:41 pisces kernel: [  102.470452] pps pps0: PPS event at
1353035851.050598985
Nov 15 19:17:41 pisces kernel: [  102.470479] pps pps0: capture assert seq #1

my /etc/modules consists of:
loop
pps_gpio

my /etc/ntp.conf consists of:

# NEMA data on /dev/gps0
server 127.127.20.0 mode 48 minpoll 3 iburst prefer
fudge 127.127.20.0 flag1 0 time2 0.400

#PPS on /dev/pps0
server 127.127.22.0 minpoll 4 maxpoll 4
fudge 127.127.22.0 flag3 1 flag4 1

/dev:
crw-rw---T 1 root dialout 204, 64 Nov 19 17:46 /dev/ttyAMA0
lrwxrwxrwx 1 root root 7 Dec 31  1969 /dev/gps0 -> ttyAMA0
crwxrwxrwt 1 root tty 251, 0 Nov 15 19:17 /dev/pps0
lrwxrwxrwx 1 root root 4 Nov 15 19:17 /dev/gpspps0 -> pps0

and this is what I am seeing in ntp:
ntpq -c lpeers
 remote   refid  st t when poll reach   delay   offset  jitter
==
*GPS_NMEA(0)  .GPS.0 l18  3770.000
-55.452   9.778
oPPS(0) .PPS.0 l8   16  377
0.000   -0.001   0.001
+69.85.88.32  128.4.1.12 u   26   64  377  101.895
   4.132   1.447
-irc.indoforum.o   64.147.116.229   2 u   37   64  377   18.260
4.336   2.875
-ntp1.ResComp.Be 128.32.206.55 3 u   51   64  377   38.9926.287   2.307
+199.241.31.96  164.244.221.197  2 u7   64  377   70.261
-21.524   3.039

I don't see any problems with the RPi creating the /dev/pps0 device on
startup and since I've done more RTFM I actually get good PPS data :)

I did contribute to the thread listed at the RPi forums but need to go
back and add what got it working for me.  I also moved to a more
current kernel.  I compiled a bunch of extra stuff in there as I want
to play with the networking stuff too so my kernel is not a small one.

uname -a
Linux pisces 3.6.1+ #1 Fri Nov 2 02:10:35 PDT 2012 armv6l GNU/Linux

James
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-21 Thread David Taylor

On 20/11/2012 11:12, Miroslav Lichvar wrote:

On Mon, Nov 19, 2012 at 06:03:06PM +, David Taylor wrote:

On both systems, sudo modprobe pps_ldisc produces no output.


No message is a good message :).


I have no idea which device ntpd is using, I simply have the type 22
driver installed which, as I understood it, gets the accurate
timestamp from the kernel.


127.127.22.0 is /dev/pps0, 127.127.22.1 is /dev/pps1, ...


How the kernel chooses which device to
use I don't know.


With udev the order might be random. There could be a race between the
script which loads modules from /etc/modules and udev.


In /dev I see pps0 on the system without a PPS signal connected, and
pps0 and pps1 on the system /with/ the PPS signal active.  On the
system /with/ the signal active, some 25 seconds in the dmes output
I see: pps_ldisc registered (so ldisc does matter, I stand
corrected), followed by pps1 new source, and source /dev/ttyAMA0
added.


You can see what pps device is actually generating events with:
grep '' /sys/class/pps/pps*/{assert,clear}


So the issue appears to be that /dev/ttyAMA0 is not created until
the GPS receiver is sending second pulses, and by that time ntpd is
running and can't see the device.  Here are my lines from ntp.conf:

# Kernel-mode PPS ref-clock for the precise seconds
server 127.127.22.0 minpoll 4 maxpoll 4
fudge 127.127.22.0  flag3 1  refid PPS

I wonder whether I should be using 127.127.22.1 rather than .0?


Perhaps. Do you use in ntpd the serial output from the GPS with some
driver like NMEA?

If you don't need the pps from /dev/ttyACM0, my suggestion would be to
prevent loading of the pps_ldisc module, so there is always only one
pps device. Any chance you added a udev rule to load pps_ldisc
automatically when the serial device is created?


Thanks for your reply, Miroslav, but I don't even know what udev is, let 
alone how to edit it!  Sorry, but you are way past my level now.

--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-21 Thread David Taylor

On 20/11/2012 10:00, Uwe Klein wrote:

David Taylor wrote:

I wonder whether I should be using 127.127.22.1 rather than .0?


probably.
but and before:
do you have the "pps-tools" package installed?

This guy seems to see your problem:
 http://blog.retep.org/tag/raspberry-pi/

uwe


Yes, Uwe, I have the pps-tools, and I can see the transitions.

I also had a similar problem to that reported on Peter's blog.  That was 
fixed by using:


  $ dpkg-reconfigure gps

although I coudl have edited the file: /etc/default/gpsd  to change the 
line: GPSD_OPTIONS="" to GPSD_OPTIONS="-n".

--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-21 Thread David Taylor

On 20/11/2012 01:55, james machado wrote:

David,

running RPi with GPS+PPS here.

I compiled my own kernel and the one major gotcha I had was an RTFM
issue.  The kernel used on the RPi is not the compressed vmlinuz
kernel used on PC's.  I recompiled my kernel 10 times or more before I
went back scouring the 'net to find out the kernel in use was the
kernel.img file.  Reason I say this is the first time I thought I had
this working I was seeing kernel generated PPS signals and not GPS
generated PPS signals.  Life got much easier when I figured that out
:)


[]

I did contribute to the thread listed at the RPi forums but need to go
back and add what got it working for me.  I also moved to a more
current kernel.  I compiled a bunch of extra stuff in there as I want
to play with the networking stuff too so my kernel is not a small one.

uname -a
Linux pisces 3.6.1+ #1 Fri Nov 2 02:10:35 PDT 2012 armv6l GNU/Linux

James


James,

Many thanks for that information.  Lots of good stuff!  Perhaps some day 
in the future I'll be recompiling the kernel (I recall that as being 
long process), but for now I'll just try to remember to reboot after 
power-up.

--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-21 Thread unruh
On 2012-11-21, David Taylor  wrote:
> On 20/11/2012 11:12, Miroslav Lichvar wrote:
>> On Mon, Nov 19, 2012 at 06:03:06PM +, David Taylor wrote:
>>> On both systems, sudo modprobe pps_ldisc produces no output.
>>
>> No message is a good message :).
>>
>>> I have no idea which device ntpd is using, I simply have the type 22
>>> driver installed which, as I understood it, gets the accurate
>>> timestamp from the kernel.
>>
>> 127.127.22.0 is /dev/pps0, 127.127.22.1 is /dev/pps1, ...
>>
>>> How the kernel chooses which device to
>>> use I don't know.
>>
>> With udev the order might be random. There could be a race between the
>> script which loads modules from /etc/modules and udev.
>>
>>> In /dev I see pps0 on the system without a PPS signal connected, and
>>> pps0 and pps1 on the system /with/ the PPS signal active.  On the
>>> system /with/ the signal active, some 25 seconds in the dmes output
>>> I see: pps_ldisc registered (so ldisc does matter, I stand
>>> corrected), followed by pps1 new source, and source /dev/ttyAMA0
>>> added.
>>
>> You can see what pps device is actually generating events with:
>> grep '' /sys/class/pps/pps*/{assert,clear}
>>
>>> So the issue appears to be that /dev/ttyAMA0 is not created until
>>> the GPS receiver is sending second pulses, and by that time ntpd is
>>> running and can't see the device.  Here are my lines from ntp.conf:
>>>
>>> # Kernel-mode PPS ref-clock for the precise seconds
>>> server 127.127.22.0 minpoll 4 maxpoll 4
>>> fudge 127.127.22.0  flag3 1  refid PPS
>>>
>>> I wonder whether I should be using 127.127.22.1 rather than .0?
>>
>> Perhaps. Do you use in ntpd the serial output from the GPS with some
>> driver like NMEA?
>>
>> If you don't need the pps from /dev/ttyACM0, my suggestion would be to
>> prevent loading of the pps_ldisc module, so there is always only one
>> pps device. Any chance you added a udev rule to load pps_ldisc
>> automatically when the serial device is created?
>
> Thanks for your reply, Miroslav, but I don't even know what udev is, let 
> alone how to edit it!  Sorry, but you are way past my level now.

grep -r ldisc /etc/udev
should show you if udev is at any time trying to load pps_ldisc.
(Why it is called ldisc and why the underscore when the other one is
pps-parport I have no idea)
Anyway, look in /etc/modprobe.conf, /etc/modules.conf, /etc/modprobe.d/*
to see if pps_ldisc is loaded in any of those files. 
grep -r ldisc /etc/mod*

Note that it should not matter anyway since you also have to use
ldattach to attach the kernel interrupt to the pps_ldisc driver even if
pps_ldisc is loaded as a module. And the space penalty is not exactly
severe.


___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-21 Thread Uwe Klein

David Taylor wrote:
Thanks for your reply, Miroslav, but I don't even know what udev is, let 
alone how to edit it!  Sorry, but you are way past my level now.


udev is the "automatic" device instantiator invoked
from inside the kernel on demand ( i.e. some device
found, some event seen  )

look into /etc/udev/rules.d/
what rules do you see?

uwe

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-21 Thread David Taylor

On 21/11/2012 18:17, unruh wrote:
[]

grep -r ldisc /etc/udev
should show you if udev is at any time trying to load pps_ldisc.
(Why it is called ldisc and why the underscore when the other one is
pps-parport I have no idea)


grep -r ldisc /etc/udev
gives no output at all, even when run with sudo.


Anyway, look in /etc/modprobe.conf, /etc/modules.conf, /etc/modprobe.d/*
to see if pps_ldisc is loaded in any of those files.
grep -r ldisc /etc/mod*


grep -r ldisc /etc/mod*
also gives no output, i.e. not found.


Note that it should not matter anyway since you also have to use
ldattach to attach the kernel interrupt to the pps_ldisc driver even if
pps_ldisc is loaded as a module. And the space penalty is not exactly
severe.


Thanks, Bill.  I hope that tells us something.
--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Timing issue with Linux and kernel PPS?

2012-11-21 Thread David Taylor

On 21/11/2012 18:08, Uwe Klein wrote:

udev is the "automatic" device instantiator invoked
from inside the kernel on demand ( i.e. some device
found, some event seen  )


Thanks, Uwe. I can't say that the function is obvious from the name, though!


look into /etc/udev/rules.d/
what rules do you see?

uwe


Two files:

pi@raspberrypi ~ $ ls /etc/udev/rules.d
40-scratch.rules  99-input.rules

pi@raspberrypi ~ $ cat /etc/udev/rules.d/40-scratch.rules
ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0003", SUBSYSTEMS=="usb", 
ACTION=="add", MODE="0666", GROUP="plugdev"


pi@raspberrypi ~ $ cat /etc/udev/rules.d/99-input.rules
SUBSYSTEM=="input", GROUP="input", MODE="0660"

I don't think that I needed to edit either of these files.
--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions