[ntp:questions] Trouble with ntpd and gpsd

tschweikle at gmail.com tschweikle at gmail.com
Tue Jul 4 10:09:05 UTC 2017


root at nc409-muc:~# ps axfu | grep 'gpsd\|ntpd'
gpsd      1459  0.0  0.7  22108  6420 ?        S<s  Jul03   0:01 /usr/sbin/gpsd -N /dev/ttyACM0
ntp       1490  0.0  0.2   5408  1844 ?        Ss   Jul03   0:08 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 102:104
root at nc409-muc:~# ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x4e545030 0          root       600        80         2
0x4e545031 32769      root       600        80         2
0x4e545032 65538      root       666        80         1
0x4e545033 98307      root       666        80         1
0x47505344 131076     root       666        31616      1
0x00000000 294917     bananapi   600        393216     2          dest
0x00000000 327686     bananapi   600        393216     2          dest
0x00000000 425991     bananapi   600        524288     2          dest
0x00000000 458760     bananapi   600        393216     2          dest
0x00000000 557065     bananapi   600        33554432   2          dest

root at nc409-muc:~# ipcs -p

------ Message Queues PIDs --------
msqid      owner      lspid      lrpid

------ Shared Memory Creator/Last-op PIDs --------
shmid      owner      cpid       lpid
0          root       528        1490
32769      root       528        1490
65538      root       566        1459
98307      root       566        1459
131076     root       566        1459
294917     bananapi   704        587
327686     bananapi   702        587
425991     bananapi   693        587
458760     bananapi   693        587
557065     bananapi   694        587



On Monday, July 3, 2017 at 6:01:10 PM UTC+2, Thomas Schweikle wrote:
> Trouble with ntpd and gpsd:
> 
> /etc/ntp.conf:
> server 127.127.28.0 minpoll 4 maxpoll 4 noselect
> fudge 127.127.28.0 time1 0.0 refid GPS
> 
> server 127.127.28.1 minpoll 4 maxpoll 4 prefer
> fudge 127.127.28.1 refid UPPS
> 
> 
> /etc/default/gpsd:
> DEVICES="/dev/ttyACM0"
> 
> # Other options you want to pass to gpsd
> GPSD_OPTIONS=""
> 
> 
> cgps or gpsmon is working, querying tcp://localhost:2947:
> tcp://localhost:2947          NMEA0183>
> +------------------------------------------------------------------------------+
> ¦Time: 2017-07-03T15:25:29.000Z Lat:  48 13' 17.862" N Lon:  11 35'
> 23.555" E  ¦ +--------------------------------- Cooked PVT
> ---------------------------------+
> +------------------------------------------------------------------------------+
> ¦ GPGGA GPGSA GPRMC GPBT
> GPGSV                                                 ¦
> +--------------------------------- Sentences
> ----------------------------------+
> +------------------++----------------------------++----------------------------+
> ¦Ch PRN  Az El S/N ¦¦Time:      152529.000       ¦¦Time:
> 152529.000       ¦ ¦ 0  27 310 78  37 ¦¦Latitude:     4813.2977 N
> ¦¦Latitude:  4813.2977        ¦ ¦ 1  10 145 58  24 ¦¦Longitude:
> 01135.3926 E   ¦¦Longitude: 01135.3926       ¦ ¦ 2  18  84 55  29
> ¦¦Speed:     0.21             ¦¦Altitude:  591.4            ¦ ¦ 3  16
> 202 48   0 ¦¦Course:    0.1              ¦¦Quality:   1   Sats: 08 ¦ ¦
> 4   8 300 40  36 ¦¦Status:    A       FAA:     ¦¦HDOP: 1.0
> ¦ ¦ 5  21  68 36  43 ¦¦MagVar: ¦¦Geoid:                      ¦ ¦ 6  26
> 182 24  18 ¦+----------- RMC ------------++----------- GGA
> ------------+ ¦ 7  15  50 13  36
> ¦+----------------------------++----------------------------+ ¦ 8   7
> 302 10  19 ¦¦Mode: A 3                   ¦¦UTC:           RMS: ¦ ¦ 9
> 30 334  4   0 ¦¦Sats: 8 10 26 7 21 27 18 15 ¦¦MAJ: MIN:         ¦ ¦10
> 13  19  3   0 ¦¦DOP: H=1.0   V=1.3   P=1.7 ¦¦ORI:
> LAT:         ¦ ¦11  11 269  2   0 ¦¦PPS offset:
> ¦¦LON:           ALT:         ¦ +------ GSV -------++-------- GSA + PPS
> ---------++----------- GST ------------+
> 
> 
> Starting ntpd I'd awaited gpsd to be available, but "reach" keeps "0":
>  SHM(0)          .GPS.            0 l    -   16    0    0.000
> 0.000   0.000
>  SHM(1)          .UPPS.           0 l    -   16    0
> 0.000    0.000   0.000
> 
> 
> I've looked after rights on /dev/ttyACM0 and added ntp to dialout, but
> this shall not be neccessary, since ntpd uses 127.127.28.0 to access
> port 2947 with its nmea-driver. I just didn't find anything helpful
> with google for my case. Anybody out there having an idea how to get
> the whole thing working? BTW: iptables are not active. SeLinux or
> apparmor are off too.
> 
> How do I get it to work?
> 
> -- 
> Thomas



More information about the questions mailing list