Hey everyone,
I have done some advances with my PTP setup but still some fine enhancements
need to be done. I am sending messages from one computer to another via the
MK6c C-V2X devices. This devices have GPS and I am synchronising the computers
to their respective Mk6c attached vie Ethernet.
Now the problem is, that when I send a message from Tx to Rx and measure the
latency (attach timestamp to message and check in the Rx with the actual time),
I get negative values and quite high also. They are all around -400-450 ms
delay, which means that the computers are not getting the exact time from the
gps in the MK6c devices.
I am executing the commands below in each device. Do you know if I can get a
better synchronization in order to get the 4 elements in sync?
Thanks a lot in advance and have a nice weekend!
Bests,
Fede
Master-1 (Cohda Wireless MK6C with C-v2x qualcom modem and GPS integrated)
chronyc sources
210 Number of sources = 3
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? KPPS 0 2 0 - +0ns[ +0ns] +/- 0ns
#? GNSS 0 4 0 - +0ns[ +0ns] +/- 0ns
^* qti-modem 1 2 377 4 -173us[ -193us] +/- 1222us
cat ptp.cfg
[global]
tx_timestamp_timeout 10
step_threshold 1
ptp4l -A -i eth0 -m -f ptp.cfg
ptp4l[229.691]: selected /dev/ptp0 as PTP clock
ptp4l[229.693]: driver changed our HWTSTAMP options
ptp4l[229.693]: tx_type 1 not 1
ptp4l[229.693]: rx_filter 1 not 12
ptp4l[229.693]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[229.693]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[229.694]: port 1: link up
ptp4l[237.053]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[237.053]: selected best master clock 04e548.fffe.23010c
ptp4l[237.053]: assuming the grand master role
Slave-1 (Ubuntu 20.04 Laptop)
cat ptp.conf
[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
[enp0s25]
sudo ptp4l -f ptp.conf -m
ptp4l[7229.653]: selected /dev/ptp0 as PTP clock
ptp4l[7229.653]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[7229.653]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[7230.099]: port 1: new foreign master 04e548.fffe.23010c-1
ptp4l[7232.100]: selected best master clock 04e548.fffe.23010c
ptp4l[7232.100]: running in a temporal vortex
ptp4l[7232.100]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[7233.595]: master offset -494729050 s0 freq +3191 path delay 36620
ptp4l[7234.100]: master offset -494729136 s1 freq +3021 path delay 36620
ptp4l[7234.595]: master offset -24 s2 freq +2997 path delay 36620
ptp4l[7234.595]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[7235.100]: master offset 892 s2 freq +3906 path delay 36620
ptp4l[7235.595]: master offset 1404 s2 freq +4685 path delay 36620
ptp4l[7236.100]: master offset 357 s2 freq +4059 path delay 36979
sudo phc2sys -s enp0s25 -O 0 -m
phc2sys[7239.599]: CLOCK_REALTIME phc offset -495721525 s0 freq +1751 delay
4109
phc2sys[7240.600]: CLOCK_REALTIME phc offset -495723277 s1 freq +0 delay
4377
phc2sys[7241.600]: CLOCK_REALTIME phc offset -147 s2 freq -147 delay
4301
phc2sys[7242.601]: CLOCK_REALTIME phc offset 312 s2 freq +268 delay
4103
phc2sys[7243.601]: CLOCK_REALTIME phc offset 450 s2 freq +500 delay
4113
phc2sys[7244.601]: CLOCK_REALTIME phc offset 573 s2 freq +758 delay
4143
phc2sys[7245.601]: CLOCK_REALTIME phc offset -246 s2 freq +110 delay
4146
phc2sys[7246.602]: CLOCK_REALTIME phc offset -19 s2 freq +264 delay
4160
phc2sys[7247.602]: CLOCK_REALTIME phc offset 184 s2 freq +461 delay
4109
phc2sys[7248.602]: CLOCK_REALTIME phc offset 212 s2 freq +544 delay
4160
phc2sys[7249.603]: CLOCK_REALTIME phc offset -554 s2 freq -158 delay
4125
Master 2 (Second Cohda Mk6c)
chronyc sources
210 Number of sources = 3
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#? KPPS 0 2 0 - +0ns[ +0ns] +/- 0ns
#? GNSS 0 4 0 - +0ns[ +0ns] +/- 0ns
^* qti-modem 1 4 377 4 +112us[ +111us] +/- 1272us
cat ptp.cfg
[global]
tx_timestamp_timeout 10
ptp4l -A -i eth0 -m -f ptp.cfg
ptp4l[280.355]: selected /dev/ptp0 as PTP clock
ptp4l[280.357]: driver changed our HWTSTAMP options
ptp4l[280.357]: tx_type 1 not 1
ptp4l[280.357]: rx_filter 1 not 12
ptp4l[280.357]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[280.357]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[280.358]: port 1: link up
ptp4l[287.756]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[287.757]: selected best master clock 04e548.fffe.230108
ptp4l[287.757]: assuming the grand master role
Slave-2 (Ubuntu 20.04 Laptop)
sudo ptp4l -f linuxptp.cfg -m
ptp4l[362997.494]: selected /dev/ptp0 as PTP clock
ptp4l[362997.494]: port 1 (enp0s31f6): INITIALIZING to LISTENING on
INIT_COMPLETE
ptp4l[362997.494]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on
INIT_COMPLETE
ptp4l[362997.494]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on
INIT_COMPLETE
ptp4l[362998.515]: port 1 (enp0s31f6): new foreign master 04e548.fffe.230108-1
ptp4l[363000.515]: selected best master clock 04e548.fffe.230108
ptp4l[363000.515]: running in a temporal vortex
ptp4l[363000.515]: port 1 (enp0s31f6): LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[363001.515]: master offset -1841 s0 freq +3112 path delay 8204
ptp4l[363001.942]: master offset -1945 s2 freq +2868 path delay 8204
ptp4l[363001.942]: port 1 (enp0s31f6): UNCALIBRATED to SLAVE on
MASTER_CLOCK_SELECTED
ptp4l[363002.515]: master offset -1622 s2 freq +1246 path delay 8128
ptp4l[363002.942]: master offset -814 s2 freq +1568 path delay 8053
ptp4l[363003.515]: master offset -93 s2 freq +2045 path delay 8053
sudo phc2sys -s enp0s31f6 -O -0 -m
phc2sys[363001.918]: CLOCK_REALTIME phc offset 49 s0 freq +3226 delay
0
phc2sys[363002.919]: CLOCK_REALTIME phc offset -1011 s2 freq +2167 delay
0
phc2sys[363003.919]: CLOCK_REALTIME phc offset -1263 s2 freq +904 delay
0
phc2sys[363004.920]: CLOCK_REALTIME phc offset 527 s2 freq +2315 delay
0
phc2sys[363005.920]: CLOCK_REALTIME phc offset 1450 s2 freq +3396 delay
0
phc2sys[363006.920]: CLOCK_REALTIME phc offset 1528 s2 freq +3909 delay
0
phc2sys[363007.920]: CLOCK_REALTIME phc offset 896 s2 freq +3735 delay
0
phc2sys[363008.921]: CLOCK_REALTIME phc offset 76 s2 freq +3184 delay
0
phc2sys[363009.921]: CLOCK_REALTIME phc offset -191 s2 freq +2940 delay
0
_______________________________________________
Linuxptp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-users