Dear Richard, Could you provide your feedback on given implementation, please? I am trying to figure out how to know if it works correctly.
server side: timedatectl set-ntp true phc_ctl /dev/ptp0 set phc_ctl[59699.663]: set clock time to 1593697583.328753958 or Thu Jul 2 09:46:23 2020 phc_ctl /dev/ptp0 get phc_ctl[59702.564]: clock time is 1593697586.147153638 or Thu Jul 2 09:46:26 2020 ptp4l -f gPTP.cfg -i eth0 -p /dev/ptp0 -m ptp4l[59732.670]: selected /dev/ptp0 as PTP clock ptp4l[59732.712]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[59732.712]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[59738.715]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[59738.715]: selected local clock 48b02d.fffe.05a771 as best master ptp4l[59738.715]: port 1: assuming the grand master role server side another terminal phc2sys -m -s CLOCK_REALTIME -c eth0 -wphc2sys[61775.234]: Waiting for ptp4l...phc2sys[61776.236]: Waiting for ptp4l...phc2sys[61777.237]: Waiting for ptp4l... server side third terminal Every 5.0s: (ntpq -p ; echo "" ; ntptime ; echo "" ; phc_ctl eth0 get cmp) nx2-desktop: Thu Jul 2 10:22:51 2020 ntpq: read: Connection refused ntp_gettime() returns code 0 (OK) time e2a86c13.c980c000 Thu, Jul 2 2020 10:22:11.787, (.787121), maximum error 321000 us, estimated error 0 us, TAI offset 0ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset -4005.000 us, frequency -4.896 ppm, interval 1 s, maximum error 321000 us, estimated error 0 us, status 0x0 (), time constant 6, precision 1.000 us, tolerance 500 ppm, phc_ctl[61848.123]: clock time is 1593699731.728004521 or Thu Jul 2 10:22:11 2020 phc_ctl[61848.124]: offset from CLOCK_REALTIME is 60709525ns client side inuxptp# ptp4l -f gPTP.cfg -i eth0 -p /dev/ptp0 -s -m ptp4l[16688.781]: selected /dev/ptp0 as PTP clock ptp4l[16688.816]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[16688.816]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[16696.068]: selected local clock 48b02d.fffe.05a79e as best master ptp4l[16702.343]: selected local clock 48b02d.fffe.05a79e as best master question 1: shall I run phc to sys clock at the client side? question 2: does it appear to sync with the master via the network? To me it seems as if the local ptp clock is selected as master clock. ----------------------------- Regards, Andrei Volodin https://forums.developer.nvidia.com/t/time-sensitive-networking-tsn-on-nx/125189/97 On Wed, Jun 24, 2020 at 5:08 PM Richard Cochran <richardcoch...@gmail.com> wrote: > On Wed, Jun 24, 2020 at 04:29:18PM +0000, Andrey Volodin wrote: > > The output of executing the cat command is "0" > > cat /sys/class/ptp/ptp0/n_external_timestamps > > 0 > > Does it indicate that I shall investigate the approach with ts2phc? > > No I am afraid not: > > This file contains the number of external timestamp > channels offered by the PTP hardware clock. > > So you are out of luck with this hardware platform. > > You can use the PPS input on a "best effort" basis as follows. > > - Use ntpd (or chrony, or phc2sys, etc) to synchronize the Linux > system clock to the GPS time via the PPS input. > > - Then use phc2sys to synchronize the PHC to the Linux system clock. > > > Sorry, > Richard >
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users