Hi Jacob,

Thank you for your answer. That is also what I thought, but the master and the 
slave are connected directly via an Ethernet Cable. Is it possible that the 
slave gets another Master clock from its second Ethernet interface, even if in 
the logs it says selected best master clock with the ID of my desired Master? 
See in the logs selected best master clock 04e548.fffe.230104:

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

Als ungelesen markieren

Sebastian Peters
Do 24.03.2022 10:21

-------- Forwarded Message --------
Subject:        RE: phc2sys not synchr. to right time and date
Date:   Wed, 23 Mar 2022 17:35:03 +0000
From:   Keller, Jacob E <jacob.e.kel...@intel.com>
To:     Federico Murciano <federico.murci...@dai-labor.de>, 
linuxptp-users@lists.sourceforge.net <linuxptp-users@lists.sourceforge.net>
CC:     Sebastian Peters <sebastian.pet...@dai-labor.de>

Keller, Jacob E <jacob.e.kel...@intel.com>
Mi 23.03.2022 18:39
-----Original Message----- From: Federico Murciano 
<federico.murci...@dai-labor.de> Sent: Wednesday, March 23, 2022 10:13 AM To: 
linuxptp-users@lists.sourceforge.net Cc: Sebastian Peters 
<sebastian.pet...@dai-labor.de> Subject: Re: [Linuxptp-users] phc2sys

Federico Murciano <federico.murci...@dai-labor.de>
Mi 23.03.2022 18:15
Hey agai, I also tried using linux services instead, which has a more detailed 
configuration file but stills the date is the wrong one: edge2@dai-edge2:~$ 
systemctl status ptp4l.service ● ptp4l.service - Precision Time Protocol (PTP) 
service Loaded: loaded

Federico Murciano
Mi 23.03.2022 18:13
Hey agai, I also tried using linux services instead, which has a more detailed 
configuration file but stills the date is the wrong one: edge2@dai-edge2:~$ 
systemctl status ptp4l.service ● ptp4l.service - Precision Time Protocol (PTP) 
service Loaded: loaded

Federico Murciano <federico.murci...@dai-labor.de>
Mi 23.03.2022 18:11
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,
ANTWORTENALLEN ANTWORTENWEITERLEITEN
Als ungelesen markieren

Federico Murciano
Mi 23.03.2022 17:53
Gesendete Elemente
An:
linuxptp-users@lists.sourceforge.net;
Cc:
Sebastian Peters;

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


Best regards,
Federico Murciano

M.Sc. Elektrotechnik - Telecommunications Engineer
federico.murci...@dai-labor.de
Tel. +49 (0) 30/314 -74 025 / Mob. +49 157 8642 4850
Future Communication Networks
DAI-Labor
Technische Universität Berlin
Fakultät IV – Elektrotechnik & Informatik Sekretariat TEL 14 Ernst-Reuter-Platz 
7
10587 Berlin, Germany
http://www.dai-labor.de/
DAI-Labor - Distributed Artificial Intelligence Laboratory Chief Executive 
Director: Prof. Dr. Dr. h.c. Sahin Albayrak

________________________________________
Von: Keller, Jacob E <jacob.e.kel...@intel.com>
Gesendet: Mittwoch, 23. März 2022 18:35
An: Federico Murciano; linuxptp-users@lists.sourceforge.net
Cc: Sebastian Peters
Betreff: RE: phc2sys not synchr. to right time and date

> -----Original Message-----
> From: Federico Murciano <federico.murci...@dai-labor.de>
> Sent: Wednesday, March 23, 2022 10:13 AM
> To: linuxptp-users@lists.sourceforge.net
> Cc: Sebastian Peters <sebastian.pet...@dai-labor.de>
> Subject: Re: [Linuxptp-users] phc2sys not synchr. to right time and date
>
> 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.
>
>

The PTP algorithm is going to accept the date time from whatever wins the Best 
Master Clock algorithm. Do you know what clock on the network is the master 
clock? I suspect that clock is misconfigured.

Thanks,
Jake

_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to