Hello everyone,
I am trying to sync different Ubuntu computers to the ptp master clock from another device connected to each of them. The setup is very easy: Ubuntu Laptop as Slave <-> Ubuntu device with GPS signal as Master The problem is that for one system, everything is working right, but for other system with the same setup, when the date is updated it is set to a day in 2018, which is obviously not the case. I also had some offset issues that I believe are solved already by using phc2sys with the -O 0 option (0seconds offset). Here are the steps that I follow: Master ptp.cfg file: [global] tx_timestamp_timeout 10 step_threshold 1 user@MK6C:~$ timedatectl Local time: Wed 2022-03-23 16:38:27 UTC Universal time: Wed 2022-03-23 16:38:27 UTC RTC time: Wed 2022-03-23 16:38:28 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes systemd-timesyncd.service active: no RTC in local TZ: no sudo ptp4l -A -i eth0 -m -f ptp.cfg ptp4l[101681.741]: selected /dev/ptp0 as PTP clock ptp4l[101681.742]: driver changed our HWTSTAMP options ptp4l[101681.742]: tx_type 1 not 1 ptp4l[101681.742]: rx_filter 1 not 12 ptp4l[101681.742]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[101681.743]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[101681.743]: port 1: link up ptp4l[101689.067]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[101689.067]: selected best master clock 04e548.fffe.230104 ptp4l[101689.067]: assuming the grand master role Slave-1 linuxptp.cfg file: [global] clientOnly 1 delay_mechanism Auto network_transport UDPv4 #time_stamping hardware # for the HW-timestamping slave #time_stamping software # for the SW-timestamping slave step_threshold 1.0 utc_offset 37 # make sure our slave clock is never elected as master priority1 255 priority2 255 [enp0s31f6] sudo ptp4l -s -f linuxptp.cfg -m ptp4l[105105.227]: selected /dev/ptp0 as PTP clock ptp4l[105105.228]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[105105.228]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[105105.894]: port 1: new foreign master 04e548.fffe.230104-1 ptp4l[105109.894]: selected best master clock 04e548.fffe.230104 ptp4l[105109.894]: running in a temporal vortex ptp4l[105109.895]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE ptp4l[105111.895]: master offset -18633 s0 freq +24199 path delay 267 ptp4l[105112.895]: master offset -18834 s2 freq +23998 path delay 267 ptp4l[105112.895]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[105113.895]: master offset -18827 s2 freq +5171 path delay 267 ptp4l[105114.895]: master offset -22 s2 freq +18328 path delay 262 ptp4l[105115.895]: master offset 5676 s2 freq +24019 path delay 262 ptp4l[105116.895]: master offset 5669 s2 freq +25715 path delay 257 ptp4l[105117.895]: master offset 3948 s2 freq +25695 path delay 262 ptp4l[105118.895]: master offset 2246 s2 freq +25177 path delay 267 ptp4l[105119.895]: master offset 1066 s2 freq +24671 path delay 267 ptp4l[105120.895]: master offset 363 s2 freq +24288 path delay 288 ptp4l[105121.895]: master offset 79 s2 freq +24113 path delay 273 ptp4l[105122.895]: master offset -36 s2 freq +24021 path delay 273 ptp4l[105123.895]: master offset -63 s2 freq +23984 path delay 268 edge2@dai-edge2:~$ timedatectl Local time: Mon 2018-01-29 20:52:35 UTC Universal time: Mon 2018-01-29 20:52:35 UTC RTC time: Mon 2018-01-29 20:52:35 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes NTP service: inactive RTC in local TZ: no sudo phc2sys -s enp0s31f6 -O 0 -m edge2@dai-edge2:~$ sudo phc2sys -s enp2s0 -O -36 -m phc2sys[105266.195]: CLOCK_REALTIME phc offset -72 s0 freq +31297 delay 5547 phc2sys[105267.196]: CLOCK_REALTIME phc offset -131 s2 freq +31238 delay 5503 phc2sys[105268.196]: CLOCK_REALTIME phc offset -70 s2 freq +31168 delay 5574 phc2sys[105269.197]: CLOCK_REALTIME phc offset 17 s2 freq +31234 delay 5481 phc2sys[105270.197]: CLOCK_REALTIME phc offset 102 s2 freq +31324 delay 5588 phc2sys[105271.197]: CLOCK_REALTIME phc offset 60 s2 freq +31313 delay 5590 phc2sys[105272.198]: CLOCK_REALTIME phc offset 58 s2 freq +31329 delay 5559 phc2sys[105273.198]: CLOCK_REALTIME phc offset 22 s2 freq +31310 delay 5569 ^Cphc2sys[105274.179]: CLOCK_REALTIME phc offset -66 s2 freq +31229 delay 5546 edge2@dai-edge2:~$ timedatectl Local time: Mon 2018-01-29 20:53:33 UTC Universal time: Mon 2018-01-29 20:53:33 UTC RTC time: Mon 2018-01-29 20:53:33 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes NTP service: inactive RTC in local TZ: no This is working correctly in one setup but in other two I get this weird 2018 date set. Am I missing something? Any help would be very appreciated. Thanks in advance! Best regards, Federico Murciano _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users