Sample Header Ad - 728x90

PTP time syncing not working, why its always selecting best master clock as local clock?

2 votes
1 answer
3344 views
I am trying to sync the time with PTP; I've configured the Trimble device with PTP. However, when I use LinuxPTP with the below configuration, the local clock is always selected as the best master clock.
ptp4l[892.103]: selected local clock 00032d.fffe.55bd3b as best master
I wonder why it's not picking up the Trimble device as the master clock. Devices are connected via SFP/Fiber optic cables. * PTP Config file - /etc/linuxptp/ptpv2.conf
[global]
    verbose         1  
    domainNumber    24
    clockClass      6
    priority1       128
    priority2       128
    [enp11s0]
* Run with sudo like this and console this output.
-shellsession
    $ sudo ptp4l -f /etc/linuxptp/ptpv2.conf 
    ptp4l[886.038]: selected /dev/ptp7 as PTP clock
    ptp4l[886.039]: port 1 (enp11s0): INITIALIZING to LISTENING on INIT_COMPLETE
    ptp4l[886.039]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE
    ptp4l[886.039]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE
    ptp4l[892.103]: port 1 (enp11s0): LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
    ptp4l[892.103]: selected local clock 00032d.fffe.55bd3b as best master
    ptp4l[892.103]: port 1 (enp11s0): assuming the grand master role
* I also captured the Wireshark Announce Message to see if it's helpful to debug this.
Frame 9466: 78 bytes on wire (624 bits), 78 bytes captured (624 bits) on interface enp11s0, id 0
    Ethernet II, Src: Trimble_70:07:6a (00:17:47:70:07:6a), Dst: IEEEI&MS_00:00:00 (01:1b:19:00:00:00)
    Precision Time Protocol (IEEE1588)
        0000 .... = majorSdoId: Unknown (0x0)
        .... 1011 = messageType: Announce Message (0xb)
        0000 .... = minorVersionPTP: 0
        .... 0010 = versionPTP: 2
        messageLength: 64
        domainNumber: 24
        minorSdoId: 0
        flags: 0x003c
            0... .... .... .... = PTP_SECURITY: False
            .0.. .... .... .... = PTP profile Specific 2: False
            ..0. .... .... .... = PTP profile Specific 1: False
            .... .0.. .... .... = PTP_UNICAST: False
            .... ..0. .... .... = PTP_TWO_STEP: False
            .... ...0 .... .... = PTP_ALTERNATE_MASTER: False
            .... .... .0.. .... = SYNCHRONIZATION_UNCERTAIN: False
            .... .... ..1. .... = FREQUENCY_TRACEABLE: True
            .... .... ...1 .... = TIME_TRACEABLE: True
            .... .... .... 1... = PTP_TIMESCALE: True
            .... .... .... .1.. = PTP_UTC_REASONABLE: True
            .... .... .... ..0. = PTP_LI_59: False
            .... .... .... ...0 = PTP_LI_61: False
        correctionField: 0.000000 nanoseconds
            correction: Ns: 0 nanoseconds
            correctionSubNs: 0 nanoseconds
        messageTypeSpecific: 0
        ClockIdentity: 0x001747fffe70076a
            MAC Vendor: Trimble
        SourcePortID: 1
        sequenceId: 28828
        controlField: Other Message (5)
        logMessagePeriod: -3
        originTimestamp (seconds): 0
        originTimestamp (nanoseconds): 0
        originCurrentUTCOffset: 37
        priority1: 128
        grandmasterClockClass: 6
        grandmasterClockAccuracy: The time is accurate to within 100 ns (0x21)
        grandmasterClockVariance: 20061
        priority2: 128
        grandmasterClockIdentity: 0x001747fffe70076a
        localStepsRemoved: 0
        TimeSource: GPS (0x20)
* Sync Command
-shell
    phc2sys -w -m -s enp11s0 -c CLOCK_REALTIME
When I check some other configs on the internet, their logs show the correct clock selection, but mine always selects the best master clock as the local clock, and it won't sync the time from the master/boundary clock (right now, I am using a Trimble 1570001820 device with GPS). Other notes: * NTP disabled * Hardware is capable of handling PTP, and the latest drivers are installed.
Asked by Elshan (123 rep)
Apr 4, 2024, 11:15 PM
Last activity: Oct 4, 2024, 10:48 AM