Skip to content

Commit

Permalink
update doc and config for sync
Browse files Browse the repository at this point in the history
  • Loading branch information
orgua committed Jan 15, 2024
1 parent a1e9068 commit 56ccc73
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion deploy/roles/ptp_host/files/phc2sys@.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ Before=time-sync.target
Type=simple
ExecStartPre=-/bin/sleep 5
# ExecStart=/usr/sbin/phc2sys -w -s %I
ExecStart=/usr/sbin/phc2sys -rr -w -s %I
# ExecStart=/usr/sbin/phc2sys -rr -w -s %I
ExecStart=/usr/sbin/phc2sys -r -w -s %I -E linreg
# for client: -r -w -s %I -E linreg
# for server: -a -rr -E linreg, TODO: put in ansible
# for both: -rr -w -s %I -E linreg
# -q do not print messages to syslog
# -m print msgs to stdout
# -a autoconfig
# -rr sync realtime clock and also consider it as a time source
# -w wait for ptp4l
# -s main clock
# -E clock servo (pi|linreg) - linreg is superior
RestartSec=5
Restart=always
StartLimitBurst=10
Expand Down
8 changes: 7 additions & 1 deletion deploy/roles/ptp_host/files/ptp4l@.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ After=sys-subsystem-net-devices-%i.device
Type=simple
ExecStartPre=/usr/sbin/ntpdate -b -s -u pool.ntp.org
# ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp/ptp4l.conf -i %I
ExecStart=/usr/sbin/ptp4l -A -f /etc/linuxptp/ptp4l.conf -i %I
ExecStart=/usr/sbin/ptp4l -A -H -f /etc/linuxptp/ptp4l.conf -i %I
# -2 -> IEEE 802.3 Network Transport, TODO: seems to produce "sheep03 ptp4l[4062]: [2837.436] port 1: bad message"
# -A -> Auto Delay Mechanism (E2E first, then maybe P2P)
# -H -> use hardware timestamping
# /etc/linuxptp/ptp4l.conf
# slaveOnly 0/1 -> roles should be static
# clock_servo linreg/pi -> linreg should be superior


RestartSec=5
Restart=always
StartLimitBurst=10
Expand Down

0 comments on commit 56ccc73

Please sign in to comment.