Hey everyone,

I am quite new to PTP deployment and got stuck while setting up my PTP
client in an Ubuntu laptop. I have a device where Ubuntu 18.04 is running
and a GPS signal is available. This node is acting as a Grandmaster clock.

On the other side of the Ethernet connection I have my Ubuntu 20.04 laptop
where I am running the PTP client. I can see that it receives some PTP
messages (I saw the packets in Wireshark to confirm this) and that the
client perceives a Master in the LAN.

Everything looks good but now I can`t set the client to use this clock as
its main clock. I would like to change the system clock in my laptop to
synchronize with the master. I used pch2sys as following but I get this
output and it gets stuck there repeating the "waiting for ptp4l" message:

*fcs@fcs-ThinkPad-T470P*:*~*$ sudo phc2sys -a -r -m

phc2sys[682997.385]: Waiting for ptp4l...

phc2sys[682998.387]: Waiting for ptp4l...

phc2sys[682999.388]: Waiting for ptp4l...

Any help would be very appreciated. Thanks in advance!

This are the output of the services where ptp4l are running (I receive some
scripts from the GPS device vendor with this services, master and slave):

*MASTER*:

root@MK6C:~# systemctl status ptp_master

*●* ptp_master.service - Linux PTP Time Service

   Loaded: loaded (/etc/systemd/system/ptp_master.service; disabled; vendor
preset: enabled)

   Active: *active (running)* since Mon 2021-11-08 16:36:06 UTC; 6s ago

 Main PID: 18357 (ptp_start_maste)

    Tasks: 2 (limit: 2128)

   CGroup: /system.slice/ptp_master.service

           ├─18357 /bin/bash /mnt/rw/ptp/ptp_start_master

           └─18359 ptp4l -E -S -l 5 -f /mnt/rw/ptp/ptp4l_master.conf -m


Nov 08 16:36:06 MK6C ptp_start_master[18357]: + '[' -f
/mnt/rw/ptp/ptp4l_master.conf ']'

Nov 08 16:36:06 MK6C ptp_start_master[18357]: + killall -9 ptp4l

Nov 08 16:36:07 MK6C ptp_start_master[18357]: ptp4l: no process found

Nov 08 16:36:07 MK6C ptp_start_master[18357]: + nice -n 10 ptp4l -E -S -l 5
-f /mnt/rw/ptp/ptp4l_master.conf -m

Nov 08 16:36:07 MK6C ptp_start_master[18357]: ptp4l[20525.075]: port 1:
INITIALIZING to LISTENING on INITIALIZE

Nov 08 16:36:07 MK6C ptp_start_master[18357]: ptp4l[20525.075]: port 0:
INITIALIZING to LISTENING on INITIALIZE

Nov 08 16:36:07 MK6C ptp_start_master[18357]: ptp4l[20525.076]: port 1:
link up

Nov 08 16:36:13 MK6C ptp_start_master[18357]: ptp4l[20531.263]: port 1:
LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES

Nov 08 16:36:13 MK6C ptp_start_master[18357]: ptp4l[20531.263]: selected
best master clock 04e548.fffe.230108

Nov 08 16:36:13 MK6C ptp_start_master[18357]: ptp4l[20531.263]: assuming
the grand master role



*SLAVE:*

(base) *fcs@fcs-ThinkPad-T470P*:*~*$ sudo systemctl status ptp_slave.service


*●* ptp_slave.service - Linux PTP Time Service

     Loaded: loaded (/etc/systemd/system/ptp_slave.service; disabled;
vendor preset: enabled)

     Active: *active (running)* since Mon 2021-11-08 16:36:54 GMT; 7s ago

   Main PID: 594428 (ptp_start_slave)

      Tasks: 2 (limit: 18781)

     Memory: 664.0K

     CGroup: /system.slice/ptp_slave.service

             ├─594428 /bin/bash /mnt/rw/ptp/ptp_start_slave

             └─594430 ptp4l -E -S -l 5 -f /mnt/rw/ptp/ptp4l_slave.conf -m


Nov 08 16:36:55 fcs-ThinkPad-T470P ptp_start_slave[594430]:
ptp4l[681570.370]: port 1 (enp0s31f6): new foreign master
04e548.fffe.230108-1

Nov 08 16:36:55 fcs-ThinkPad-T470P ptp4l[594430]: *[681570.370] port 1
(enp0s31f6): new foreign master 04e548.fffe.230108-1*

Nov 08 16:36:59 fcs-ThinkPad-T470P ptp_start_slave[594430]:
ptp4l[681574.371]: selected best master clock 04e548.fffe.230108

Nov 08 16:36:59 fcs-ThinkPad-T470P ptp_start_slave[594430]:
ptp4l[681574.371]: foreign master not using PTP timescale

Nov 08 16:36:59 fcs-ThinkPad-T470P ptp_start_slave[594430]:
ptp4l[681574.371]: running in a temporal vortex

Nov 08 16:36:59 fcs-ThinkPad-T470P ptp4l[594430]: *[681574.371] selected
best master clock 04e548.fffe.230108*

Nov 08 16:36:59 fcs-ThinkPad-T470P ptp_start_slave[594430]:
ptp4l[681574.371]: port 1 (enp0s31f6): LISTENING to UNCALIBRATED on RS_SLAVE

Nov 08 16:36:59 fcs-ThinkPad-T470P ptp4l[594430]: *[681574.371] foreign
master not using PTP timescale*

Nov 08 16:36:59 fcs-ThinkPad-T470P ptp4l[594430]: *[681574.371] running in
a temporal vortex*

Nov 08 16:36:59 fcs-ThinkPad-T470P ptp4l[594430]: *[681574.371] port 1
(enp0s31f6): LISTENING to UNCALIBRATED on RS_SLAVE*
-- 
Best regards,

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

Reply via email to