User Tools

Site Tools


timehat:software_03-2025


This is an old revision of the document!


TimeHat Software 03/2025

This page serves as a descriptor of how the software is configured on the TimeHat SD card as of 03/2025. Made for the Pi3b and 4b. (Will be testing and adding support for other Raspberry Pi models as time allows, and as interest is shown).

  • RV-3032-c7 Version

General

Software Info

  • The operating system is Raspbian Lite (64bit)
  • Key software conponents:
    • chrony - NTP client & server
    • gpsd - communicates with and configures the GNSS receiver, sends time data to chrony
    • lighttpd - web server for status page
    • sshd - remote access over secure shell

Hardware Info

  • CPU locked to 1GHz to minimize jitter and heat
  • GNSS receiver connected to ttyAMA0
  • RTC (DS3131 or RV-3032-c7) connect to i2c bus
  • WiFi and Bluetooth disabled to save power. Also WiFi is generally too unstable for use as a network time server.
  • RAM usage is minimal, any Pi can run this setup, adding more RAM will not improve performance.

Config Files

config.txt

/boot/firmware/config.txt

# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details
 
dtparam=i2c_arm=on
dtoverlay=i2c-rtc,rv3032
dtparam=backup-switchover-mode=1
 
arm_64bit=1
 
[all]
enable_uart=1
dtoverlay=disable-wifi
dtoverlay=disable-bt
dtoverlay=pps-gpio,gpiopin=4
dtparam=act_led_trigger=heartbeat
 
disable_fw_kms_setup=1
auto_initramfs=1
#disable_poe_fan=1
#force_eeprom_read=0
#ignore_lcd=1
 
arm_boost=0
arm_freq=1000
force_turbo=1

gpsd

/etc/default/gpsd

GPSD_OPTIONS="-n -p"
DEVICES="/dev/ttyAMA0"

gpsd.service

/etc/systemd/system/gpsd.service

[Unit]
Description=GPS (Global Positioning System) Daemon
Requires=gpsd.socket
# Needed with chrony SOCK refclock
After=chronyd.service

[Service]
Type=forking
EnvironmentFile=-/etc/default/gpsd
EnvironmentFile=-/etc/sysconfig/gpsd
ExecStart=/usr/local/sbin/gpsd $GPSD_OPTIONS $OPTIONS $DEVICES

[Install]
WantedBy=multi-user.target
Also=gpsd.socket

chrony.conf

/etc/chrony.conf

server time-a.nist.gov
server time-a-wwv.nist.gov
server time-a-b.nist.gov

refclock SOCK /run/chrony.ttyAMA0.sock refid GPS

rtcsync

logchange 0.5

local stratum 10

makestep 1.0 3

logdir /var/log/chrony
log statistics tracking

dumpdir /var/log/chrony
driftfile /chrony.drift

allow

chronyd.service

/etc/systemd/system/chronyd.service

[Unit]
Description=chrony, an NTP client/server
Documentation=man:chronyd(8) man:chronyc(1) man:chrony.conf(5)
Conflicts=openntpd.service ntp.service ntpsec.service
Wants=time-sync.target
Before=time-sync.target
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/sbin/chronyd -f /etc/chrony.conf

[Install]
Alias=chronyd.service
WantedBy=multi-user.target
timehat/software_03-2025.1742088195.txt.gz ยท Last modified: by millerjs

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki