Re: [chrony-users] Not getting time from gpsd

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


No gpsd.conf.  /etc/default/gpsd is :

# Default settings for the gpsd init script and the hotplug wrapper.

# Start the gpsd daemon automatically at boot time
START_DAEMON="true"

# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="true"

# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyACM0"

# Other options you want to pass to gpsd
GPSD_OPTIONS="-F /var/run/chrony.ttyACM0.sock"



$ ps -ef |grep gpsd |grep -v grep
gpsd     31426     1  0 13:36 ?        00:00:00 /usr/sbin/gpsd -N -F /var/run/chrony.ttyACM0.sock /dev/ttyACM0

cgps shows 3d fix

On Sat, Aug 6, 2016 at 2:11 PM, Steve Horton <stevejhorton@xxxxxxxxx> wrote:

Ok..can I see your gpsd conf?


On Aug 6, 2016 1:39 PM, "Chris Greenman" <chris.m.greenman@xxxxxxxxx> wrote:
I only included the relevant lines.  When the socket didn't work either I commented it out and went back to shm

Here is my full chrony.conf.  Note, I commented out the ntp servers so that I can just concentrate on troubleshooting the GPS clock and uncommented the SOCK line



driftfile /var/lib/chrony/drift

allow

# set larger delay to allow the NMEA source to overlap with
# the other sources and avoid the falseticker status
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
#refclock SHM 1 refid PPS precision 1e-9
refclock SOCK /var/run/chrony.ttyACM0.sock refid GPSS

makestep 1 -1




On Sat, Aug 6, 2016 at 10:41 AM, Steve Horton <stevejhorton@xxxxxxxxx> wrote:

Not really Chris. I don't see a sock option in your configuration file. Gpsd should write time out to a device file some where and chrony can read the time from that device file via a Unix domain socket.. Like I said..look into the sock option  and how it relates to gpsd.


On Aug 6, 2016 10:10 AM, "Chris Greenman" <chris.m.greenman@xxxxxxxxx> wrote:

Same thing..  Already tried it.


On Aug 6, 2016 6:35 AM, "Steve Horton" <stevejhorton@xxxxxxxxx> wrote:

I'd look closer at the SOCK option under the refclock section. https://chrony..tuxfamily.org/manual.html#refclock-directive

On Aug 6, 2016 12:00 AM, "Chris Greenman" <chris.m.greenman@xxxxxxxxx> wrote:
>
> Hello,
>     I'm having an issue with getting time from gpsd.
>
> My setup is:
> Raspberry Pi 3 running Jessie Lite
> USB U-Blox gps
>
> gpsd is receiving NMEA from the GPS, cgps also shows time and position properly. 
>
> My chrony.conf is:
>>
>> server 0.us..pool.ntp.org
>> server 1.us..pool.ntp.org
>> server 2.us..pool.ntp.org
>> server 3.us..pool.ntp.org
>> driftfile /var/lib/chrony/drift
>> allow
>> refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
>> makestep 1 -1
>>
> Chronyc sources shows this:
>>
>> $ chronyc sources
>> 210 Number of sources = 5
>> MS Name/IP address         Stratum Poll Reach LastRx Last sample
>> ===============================================================================
>> #? GPS                           0   4     0   10y     +0ns[   +0ns] +/-    0ns
>> ^+ time-c.nist.gov               1   9   375   110    -23ms[  -22ms] +/-   47ms
>> ^* pool-96-248-122-64.cmdnnj     1  10   377    56  +9749us[  +11ms] +/-   18ms
>> ^- 104.156.99.226                2   9   377   367    +15ms[  +17ms] +/-  107ms
>> ^- 4.53.160.75
>>
> This system is going to be used on a boat and might not have internet.  I can tell that both programs are accessing the shared memory using ipcs -m:
>
>> ------ Shared Memory Segments --------
>> key        shmid      owner      perms      bytes      nattch     status      
>> 0x4e545030 0          root       600        80         2                       
>> 0x4e545031 32769      root       600        80         1
>>
> Any idea why chrony isn't getting time from the GPS?
>
> Thanks





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/