Re: Setting up auto time with draws gps #ntp #chrony #gps #clock #battery

Basil Gunn

Also, I just plugged the gps antenna back in, and it updated the time!

So my guess is that gpsd isn't compiled correctly to update the time
from the internal RTC if the antenna isn't plugged in. This can be a
huge issue for some people and needs to be addressed.
I'm not sure if gpsd is not compiled correctly or if it's just buggy. I
read a post that said that you need to run at least gpsd version
3.17. Debian Stretch, has gpsd version 3.16.4 in its repo.

I tried to load the latest version of gpsd (3.18.1) from Debian
experimental & got into a dependency mess so built from source.
That worked & I ended up with:

gpsd -V
gpsd: 3.18.1 (revision 3.18.1)

I wanted to try out your scenario so unplugged the GPS antenna &
Ethernet cable. Tried a warm boot, then a cold boot, and date & time
look OK, that is, date/time matched my workstation date/time. So I
think without an Ethernet cable or gps antenna the date/time will be
read from the battery backed up rtc and date/time will be ok for a
while until a reference can be accessed.

Let me know if I missed something.
Contact me directly if you want my gpsd source build instructions.

Here is my main scenario as to why this needs to be addressed: you go
out to field day with your setup and you forgot your gps antenna! you
have no cell signal so you have no internet access to update the
system time! you can't set it manually because ft8 and other time
sensitive modes needs a high precision clock.... also there is the
matter of logging contacts for contests/events that require accurate

Also, I believe when the pi turns on it does set the time from
chrony's source (internet/gps/rtc), and if the rtc isn't updating when
no antenna is attached then the system time won't be right during
startup (which i'm sure will be the cause of headaches for some niche

Join to automatically receive all group messages.