gpsd-users
[Top][All Lists]
Advanced

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

[gpsd-users] NTP1 keeps going away.


From: stinga
Subject: [gpsd-users] NTP1 keeps going away.
Date: Wed, 8 Nov 2017 13:58:19 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

G'day all,

I have been struggling to get this to work reliably.

pi details
model b1

address@hidden:~# uname -a
Linux raspberrypi 4.9.57+ #1045 Fri Oct 20 11:38:56 BST 2017 armv6l GNU/Linux

address@hidden:~# lsmod|grep pps
pps_gpio                3025  3
pps_core                8788  4 pps_gpio

address@hidden:~# dmesg|grep -i pps
[    4.107607] pps_core: LinuxPPS API ver. 1 registered
[    4.107618] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <address@hidden>
[    4.141574] pps pps0: new PPS source pps.-1
[    4.141702] pps pps0: Registered IRQ 183 as PPS source

What I see is on occasions is NTP1 goes away:

ntpshmmon|perl -pe 'use POSIX strftime; print strftime "[%Y-%m-%d %H:%M:%S] ", localtime'

[2017-11-08 13:37:09] sample NTP1 1510148229.993591083 1510148229.992142100 1510148230.000000000 0 -30
[2017-11-08 13:37:10] sample NTP0 1510148230.120970573 1510148230.120032584 1510148230.000000000 0 -20
[2017-11-08 13:37:10] sample NTP1 1510148230.992952236 1510148230.992167245 1510148231.000000000 0 -30
[2017-11-08 13:37:11] sample NTP0 1510148231.119250739 1510148231.117749757 1510148231.000000000 0 -20
[2017-11-08 13:37:12] sample NTP0 1510148232.119447882 1510148232.118561893 1510148232.000000000 0 -20
[2017-11-08 13:37:13] sample NTP0 1510148233.121741001 1510148233.120245019 1510148233.000000000 0 -20
[2017-11-08 13:37:14] sample NTP0 1510148234.118376186 1510148234.117566196 1510148234.000000000 0 -20
[2017-11-08 13:37:15] sample NTP0 1510148235.124522259 1510148235.123756268 1510148235.000000000 0 -20
[2017-11-08 13:37:16] sample NTP0 1510148236.122933424 1510148236.121452441 1510148236.000000000 0 -20
[2017-11-08 13:37:17] sample NTP0 1510148237.119988604 1510148237.118607621 1510148237.000000000 0 -20
[2017-11-08 13:37:18] sample NTP0 1510148238.122259723 1510148238.120820740 1510148238.000000000 0 -20
[2017-11-08 13:37:19] sample NTP0 1510148239.123616853 1510148239.122704864 1510148239.000000000 0 -20
[2017-11-08 13:37:20] sample NTP0 1510148240.116466083 1510148240.115647093 1510148240.000000000 0 -20
[2017-11-08 13:37:21] sample NTP0 1510148241.117047222 1510148241.115650239 1510148241.000000000 0 -20
[2017-11-08 13:37:22] sample NTP0 1510148242.119619337 1510148242.118771347 1510148242.000000000 0 -20
[2017-11-08 13:37:23] sample NTP1 1510148243.001293854 1510148242.999957899 1510148243.000000000 0 -30
[2017-11-08 13:37:23] sample NTP0 1510148243.118191916 1510148243.116724966 1510148243.000000000 0 -20
[2017-11-08 13:37:24] sample NTP1 1510148244.001930145 1510148244.000578191 1510148244.000000000 0 -30
[2017-11-08 13:37:24] sample NTP0 1510148244.119241193 1510148244.117678246 1510148244.000000000 0 -20
[2017-11-08 13:37:25] sample NTP1 1510148245.002410441 1510148245.001076486 1510148245.000000000 0 -30

Sometime it never comes back, if I pull the PPS to GPIO cable and reconnect it will work again (but not always)

Also, while doing:

address@hidden:~# ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1510148557.996485612, sequence: 438970 - clear  0.000000000, sequence: 0
source 0 - assert 1510148558.001389037, sequence: 438974 - clear  0.000000000, sequence: 0
source 0 - assert 1510148558.001719066, sequence: 438985 - clear  0.000000000, sequence: 0
source 0 - assert 1510148558.015093227, sequence: 438986 - clear  0.000000000, sequence: 0
source 0 - assert 1510148558.020151666, sequence: 438998 - clear  0.000000000, sequence: 0
source 0 - assert 1510148558.996611407, sequence: 439003 - clear  0.000000000, sequence: 0
source 0 - assert 1510148559.001163803, sequence: 439006 - clear  0.000000000, sequence: 0
source 0 - assert 1510148559.001555837, sequence: 439018 - clear  0.000000000, sequence: 0
source 0 - assert 1510148559.014905995, sequence: 439019 - clear  0.000000000, sequence: 0
source 0 - assert 1510148559.020076444, sequence: 439035 - clear  0.000000000, sequence: 0
source 0 - assert 1510148559.996735203, sequence: 439041 - clear  0.000000000, sequence: 0

Is more than 1 per second is that correct?

I can see /dev/pps0 is opened by
address@hidden:~# lsof|grep pps
gpsd      417         nobody    6u      CHR      245,0      0t0       5394 /dev/pps0
gpsd      417 442     nobody    6u      CHR      245,0      0t0       5394 /dev/pps0


and I don#t know if this is correct:
address@hidden:~# chronyc sources -v
210 Number of sources = 2

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample              
===============================================================================
#? GPS                           0   4   377    15   -883ms[ -883ms] +/-  200ms
#* PPS                           0   4   377    17   -836us[ -868us] +/-  689us

address@hidden:~# cat /etc/chrony.conf
driftfile /var/lib/chrony/drift

#old - nearly worked
#refclock SHM 0 offset 0.5 delay 0.2 refid gps precision 1e-1
#refclock SHM 1:perm=0644 refid pps precision 1e-9 prefer
#refclock PPS /dev/pps0 refid PPS lock NMEA prefer

refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2 noselect
refclock SHM 1:perm=0644 refid PPS precision 1e-9


#oldfile
#driftfile /var/lib/chrony/drift
#
#refclock SHM 0 offset 0.5 delay 0.2 refid NMEA noselect
#refclock PPS /dev/pps0 refid PPS lock NMEA prefer


I have tried many things and am maybe now confused....
-- 
'ooroo

Stinga...(:)-)
---------------------------------------------------
Email: address@hidden         o
You need only two tools.        o /////
A hammer and duct tape. If it    /@   `\  /) ~
doesn't move and it should use  >  (O)  X<  ~  Fish!!
the hammer. If it moves and      `\___/'  \) ~
shouldn't, use the tape.           \\\
---------------------------------------------------

-- 
'ooroo

Stinga...(:)-)
---------------------------------------------------
Email: address@hidden         o
You need only two tools.        o /////
A hammer and duct tape. If it    /@   `\  /) ~
doesn't move and it should use  >  (O)  X<  ~  Fish!!
the hammer. If it moves and      `\___/'  \) ~
shouldn't, use the tape.           \\\
---------------------------------------------------

reply via email to

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