gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Feeding chrony from GPSD


From: Miroslav Lichvar
Subject: Re: [gpsd-users] Feeding chrony from GPSD
Date: Wed, 2 Apr 2014 12:56:52 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Apr 01, 2014 at 11:37:28AM +0300, Yakov Shmulevich wrote:
> But if, I try to use socket method by follow definitions in chrony.conf:
> 
> *# set larger delay to allow the NMEA source to overlap with*
> *# the other sources and avoid the falseticker status*
> *refclock SHM 0 offset 0.183 delay 0.2 refid GPS*
> 
> *refclock SOCK /var/run/chrony.ttyUSB1.sock refid PPS*
> 
> it not synchronized with PPS at all.
> 
> What I am doing wrong?
> Should I add any definition of the socket path in gpsd running parameters?

Are you using gpsd-3.10? There was a bug that it was sending samples
with time stamp from future and which were ignored by chronyd. You may
want to try an earlier version or git.

Also, an important thing to note is that chronyd needs to be started
before gpsd.

To verify chronyd is really receiving the SOCK samples you can use
strace:

# strace ./chronyd -d |& grep 'recv.*= \(32\|40\)'
recvfrom(8, 
"\357\352;S\0\0\0\0\21\0\0\0\0\0\0\0\237\312s\301<\v\362\276\0\0\0\0\0\0\0\0"...,
 40, 0, NULL, NULL) = 40
recvfrom(8, 
"\360\352;S\0\0\0\0\21\0\0\0\0\0\0\0F\375[\355T\5\362\276\0\0\0\0\0\0\0\0"..., 
40, 0, NULL, NULL) = 40
recvfrom(8, 
"\361\352;S\0\0\0\0\21\0\0\0\0\0\0\0\323\2312rAv\361\276\0\0\0\0\0\0\0\0"..., 
40, 0, NULL, NULL) = 40

To verify gpsd is sending them:

# strace -f ./gpsd -n -N /dev/ttyS0 |& grep 'send.*= \(32\|40\)$'
[pid   378] sendto(6, 
"\357\352;S\0\0\0\0\21\0\0\0\0\0\0\0\237\312s\301<\v\362\276\0\0\0\0\0\0\0\0"...,
 40, 0, NULL, 0) = 40
[pid   378] sendto(6, 
"\360\352;S\0\0\0\0\21\0\0\0\0\0\0\0F\375[\355T\5\362\276\0\0\0\0\0\0\0\0"..., 
40, 0, NULL, 0) = 40
[pid   378] sendto(6, 
"\361\352;S\0\0\0\0\21\0\0\0\0\0\0\0\323\2312rAv\361\276\0\0\0\0\0\0\0\0"..., 
40, 0, NULL, 0) = 40

-- 
Miroslav Lichvar



reply via email to

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