Hi Richard,
The setup is as you say, with the difference that the GM is already
using HW time stamping:
1. GM using HW time stamping
2. Slave 1 using SW time stamping
3. Slave 2 using HW time stamping
So to recap, the two devices with HW timestamping (GM and slave 2) are
in sync, whereas the SW timestamping slave 1 is about 36 seconds behind.
The master is running:
ptp4l -A -i eth0
The log is:
ptp4l: [423899.781] selected /dev/ptp0 as PTP clock
ptp4l: [423899.790] driver changed our HWTSTAMP options
ptp4l: [423899.791] tx_type 1 not 1
ptp4l: [423899.792] rx_filter 1 not 12
ptp4l: [423899.793] port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l: [423899.794] port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l: [423899.796] port 1: link up
ptp4l: [423907.090] port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l: [423907.091] selected best master clock 00049f.fffe.03fa92
ptp4l: [423907.091] assuming the grand master role
Both slaves are running:
ptp4l -f linuxptp.cfg
The HW-timestamping slave is also running:
/usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -S 1.0 -O 0
The config contains:
-------------
[global]
slaveOnly 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
# make sure our slave clock is never elected as master
priority1 255
priority2 255
[eth0]
-------------
Log of the SW-timestamping slave is:
ptp4l: [413736.212] port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l: [413736.212] port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l: [413736.212] port 1: link up
ptp4l: [413737.945] port 1: new foreign master 00049f.fffe.03fa92-1
ptp4l: [413741.946] selected best master clock 00049f.fffe.03fa92
ptp4l: [413741.946] running in a temporal vortex
ptp4l: [413741.946] port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l: [413743.946] master offset 1000031308 s0 freq +6617 path
delay 118951
ptp4l: [413744.946] master offset 999987122 s0 freq +6617 path
delay 133867
ptp4l: [413745.947] master offset 999986236 s0 freq +6617 path
delay 133776
ptp4l: [413746.947] master offset 999989484 s0 freq +6617 path
delay 129759
...
ptp4l: [413760.950] master offset 16011 s2 freq +5550 path
delay 126526
ptp4l: [413760.950] port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l: [413761.951] master offset 18280 s2 freq +5795 path
delay 126142
ptp4l: [413762.951] master offset 5303 s2 freq +4503 path
delay 126390
...
The log of the HW-timestamping device is:
ptp4l: [248.549] selected /dev/ptp0 as PTP clock
ptp4l: [248.566] driver changed our HWTSTAMP options
ptp4l: [248.569] tx_type 1 not 1
ptp4l: [248.572] rx_filter 1 not 12
ptp4l: [248.572] port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l: [248.573] port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l: [248.575] port 1: link up
ptp4l: [248.633] port 1: new foreign master 00049f.fffe.03fa92-1
ptp4l: [252.633] selected best master clock 00049f.fffe.03fa92
ptp4l: [252.634] running in a temporal vortex
ptp4l: [252.635] port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l: [253.649] master offset -521 s0 freq +2421 path delay
12900
ptp4l: [254.649] master offset -372 s2 freq +2570 path delay
12810
ptp4l: [254.650] port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l: [255.650] master offset -463 s2 freq +2107 path delay
12810
ptp4l: [256.650] master offset -492 s2 freq +1939 path delay
12810
ptp4l: [257.650] master offset 127 s2 freq +2410 path delay
12810
ptp4l: [258.650] master offset 119 s2 freq +2441 path delay
12808
ptp4l: [259.651] master offset -81 s2 freq +2276 path delay
12806
...
Thanks for your help!
Petr
Post by Richard CochranPost by Petr KulhavyMy master is another ptp4l running device. What you're saying would then
mean that ptp4l in master mode sends its time in UTC.
So your setup is this?
1. GM using SW time stamping
2. Slave 1 using SW time stamping
3. Slave 2 using HW time stamping
Can you please post your setting, ie config file and command lines for
both ptp4l and phc2sys on each host?
Also, please post the log files.
Post by Petr KulhavyI don't need an absolute synchronization, I just need that the few devices
are accurately in sync with each other.
Putting aside the UTC issue, you will get better results by using HW
time stamping on the master by configuring #3 as GM.
Thanks,
Richard