Hi DanCuomo, I'm having issues getting this to work. I'm running current ptpd in Docker for Windows (Linux container) on one machine in my local network using the example unicast configuration from Github. My other machine is running Windows 10 Version 1903 with W32Time and is receiving announce messages from the master but rejecting them. The only events I get from PTP-Operational are event 515 stating current configuration. Here is the log output from the slave (w32tm.log_ptpprov):
153049 19:25:48.9301320s - ReadConfig: 'PtpMasters'=192.168.1.7
153049 19:25:48.9301642s - ReadPtpParametersFromRegistry, ret= 0x00000000
153049 19:25:48.9301867s - InitializeEvents, ret= 0x00000000
153049 19:25:48.9302098s - pwszMastersList:192.168.1.7
delayPollIntervalMsec:16000
announceIntervalMsec:4000announceReceiptTimeoutMsec:12000
bSlaveModeOnly:1bUseTimestamps:0
bAllowAnyMaster:0
bMulticastRxEnabled:0
bUseE2ECorrection:1
153049 19:25:48.9374670s - Iftmstmps disabled
153049 19:25:48.9375564s - Iftmstmps disabled
153049 19:25:48.9376105s - PtpProvider: Created 2 sockets (0 listen-only): [::]:319<0x0>, 0.0.0.0:319<0x0>
153049 19:25:48.9376556s - Iftmstmps disabled
153049 19:25:48.9377178s - Iftmstmps disabled
153049 19:25:48.9377808s - PtpProvider: Created 2 sockets (0 listen-only): [::]:320<0x0>, 0.0.0.0:320<0x0>
153049 19:25:48.9379104s - StartListeningThread completed for event port socket(s)
153049 19:25:48.9379420s - StartListeningThread completed for general port socket(s)
153049 19:25:48.9379628s - IntializePtp, ret= 0x00000000
153049 19:25:48.9379749s - RegisterListenerForSamples(), ret= 0x00000000
153049 19:25:48.9400301s - ListeningThread: StopEvent
153049 19:25:48.9401498s - TeardownPtp(), ret= 0x00000000
153049 19:25:48.9402130s - UnregisterWaitEx ret:0x00000000
153049 19:25:48.9496313s - ReadConfig: 'PtpMasters'=192.168.1.7
153049 19:25:48.9496669s - ReadPtpParametersFromRegistry, ret= 0x00000000
153049 19:25:48.9496929s - InitializeEvents, ret= 0x00000000
153049 19:25:48.9497063s - pwszMastersList:192.168.1.7
delayPollIntervalMsec:16000
announceIntervalMsec:4000announceReceiptTimeoutMsec:12000
bSlaveModeOnly:1bUseTimestamps:0
bAllowAnyMaster:0
bMulticastRxEnabled:0
bUseE2ECorrection:1
153049 19:25:48.9532085s - Iftmstmps disabled
153049 19:25:48.9532933s - Iftmstmps disabled
153049 19:25:48.9533482s - PtpProvider: Created 2 sockets (0 listen-only): [::]:319<0x0>, 0.0.0.0:319<0x0>
153049 19:25:48.9534009s - Iftmstmps disabled
153049 19:25:48.9534632s - Iftmstmps disabled
153049 19:25:48.9535262s - PtpProvider: Created 2 sockets (0 listen-only): [::]:320<0x0>, 0.0.0.0:320<0x0>
153049 19:25:48.9536653s - StartListeningThread completed for event port socket(s)
153049 19:25:48.9536833s - StartListeningThread completed for general port socket(s)
153049 19:25:48.9536973s - IntializePtp, ret= 0x00000000
153049 19:25:48.9537095s - RegisterListenerForSamples(), ret= 0x00000000
153049 19:25:51.6425689s - ListeningThread -- DataAvailEvent set for socket 1 type 1 (0.0.0.0:320)
153049 19:25:51.6426038s - ListeningThread -- Recvd 64 bytes.
153049 19:25:51.6426133s - ListeningThread -- Received Message From 192.168.1.7:51084 <- 192.168.1.8:320
153049 19:25:51.6426280s - Received general packet of length:64
153049 19:25:51.6426437s - Rx Announce packet ServerTxtimestamp:116444735630000000 ClockId:0x20011FEFFAC4202 PortNum:0x100 SequenceId:297
153049 19:25:51.6426608s - Rejecting peer that is not in the allowed master list. peerIP:192.168.1.7:51084
153049 19:25:51.6430753s - ListeningThread -- DataAvailEvent set for socket 1 type 0 (0.0.0.0:319)
153049 19:25:51.6431165s - ListeningThread -- Recvd 44 bytes.
153049 19:25:51.6431261s - ListeningThread -- Received Message From 192.168.1.7:51085 <- 192.168.1.8:319
153049 19:25:51.6431413s - Received Event Packet of length:44
153049 19:25:51.6432251s - ListeningThread -- DataAvailEvent set for socket 1 type 1 (0.0.0.0:320)
153049 19:25:51.6432506s - ListeningThread -- Recvd 44 bytes.
153049 19:25:51.6432600s - ListeningThread -- Received Message From 192.168.1.7:51084 <- 192.168.1.8:320
153049 19:25:51.6432744s - Received general packet of length:44
153049 19:25:53.2971402s - No clocks qualified as a master clock. MasterCount:0
153049 19:25:55.6425659s - ListeningThread -- DataAvailEvent set for socket 1 type 1 (0.0.0.0:320)
153049 19:25:55.6426120s - ListeningThread -- Recvd 64 bytes.
153049 19:25:55.6426221s - ListeningThread -- Received Message From 192.168.1.7:51084 <- 192.168.1.8:320
153049 19:25:55.6426366s - Received general packet of length:64
153049 19:25:55.6426467s - Rx Announce packet ServerTxtimestamp:116444735630000000 ClockId:0x20011FEFFAC4202 PortNum:0x100 SequenceId:298
153049 19:25:55.6426709s - Rejecting peer that is not in the allowed master list. peerIP:192.168.1.7:51084
One of my concerns is that extra characters often show up in the PtpMasters list fetched from the registry, as shown below. Do you know why this might happen?
153049 19:22:00.4726602s - ReadConfig: 'PtpMasters'=192.168.1.7
153049 19:22:00.4726925s - ReadPtpParametersFromRegistry, ret= 0x00000000
153049 19:22:00.4727152s - InitializeEvents, ret= 0x00000000
153049 19:22:00.4727380s - pwszMastersList:192.168.1.7
delayPollIntervalMsec:16000
announceIntervalMsec:4000announceReceiptTimeoutMsec:12000
bSlaveModeOnly:1bUseTimestamps:0
bAllowAnyMaster:0
bMulticastRxEnabled:0
bUseE2ECorrection:1
153049 19:22:00.4790711s - Iftmstmps disabled
153049 19:22:00.4791615s - Iftmstmps disabled
153049 19:22:00.4792192s - PtpProvider: Created 2 sockets (0 listen-only): [::]:319<0x0>, 0.0.0.0:319<0x0>
153049 19:22:00.4792648s - Iftmstmps disabled
153049 19:22:00.4793354s - Iftmstmps disabled
153049 19:22:00.4793991s - PtpProvider: Created 2 sockets (0 listen-only): [::]:320<0x0>, 0.0.0.0:320<0x0>
153049 19:22:00.4795526s - StartListeningThread completed for event port socket(s)
153049 19:22:00.4795713s - StartListeningThread completed for general port socket(s)
153049 19:22:00.4795920s - IntializePtp, ret= 0x00000000
153049 19:22:00.4796041s - RegisterListenerForSamples(), ret= 0x00000000
153049 19:22:00.4815898s - ListeningThread: StopEvent
153049 19:22:00.4817522s - TeardownPtp(), ret= 0x00000000
153049 19:22:00.4817943s - UnregisterWaitEx ret:0x00000000
153049 19:22:00.4933334s - ReadConfig: 'PtpMasters'=192.168.1.7
153049 19:22:00.4933675s - ReadPtpParametersFromRegistry, ret= 0x00000000
153049 19:22:00.4933920s - InitializeEvents, ret= 0x00000000
153049 19:22:00.4934051s - pwszMastersList:192.168.1.7耀
delayPollIntervalMsec:16000
announceIntervalMsec:4000announceReceiptTimeoutMsec:12000
bSlaveModeOnly:1bUseTimestamps:0
bAllowAnyMaster:0
bMulticastRxEnabled:0
bUseE2ECorrection:1
153049 19:22:00.4971654s - Iftmstmps disabled
153049 19:22:00.4972536s - Iftmstmps disabled
153049 19:22:00.4973084s - PtpProvider: Created 2 sockets (0 listen-only): [::]:319<0x0>, 0.0.0.0:319<0x0>
153049 19:22:00.4973527s - Iftmstmps disabled
153049 19:22:00.4974137s - Iftmstmps disabled
153049 19:22:00.4974787s - PtpProvider: Created 2 sockets (0 listen-only): [::]:320<0x0>, 0.0.0.0:320<0x0>
153049 19:22:00.4976451s - StartListeningThread completed for event port socket(s)
153049 19:22:00.4976948s - StartListeningThread completed for general port socket(s)
153049 19:22:00.6391038s - Failed to resolve server: 192.168.1.7耀. Error:0x80072AF9
I'm also wondering how I might set bAllowAnyMaster to true as that should avoid the issue.
Also, is there a built-in way to measure the precision of the synchronization once it completes?
Here is my w32tm configuration to verify:
C:\WINDOWS\system32>w32tm /query /configuration
[Configuration]
EventLogFlags: 2 (Local)
AnnounceFlags: 10 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 10 (Local)
MaxPollInterval: 15 (Local)
MaxNegPhaseCorrection: 54000 (Local)
MaxPosPhaseCorrection: 54000 (Local)
MaxAllowedPhaseOffset: 1 (Local)
FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 1 (Local)
UpdateInterval: 360000 (Local)
FileLogName: C:\void\logs\w32tm.log (Local)
FileLogEntries: 0-300 (Local)
FileLogSize: 1000000 (Local)
[TimeProviders]
PtpClient (Local)
DllName: c:\windows\system32\ptpprov.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
NtpClient (Local)
DllName: C:\WINDOWS\SYSTEM32\w32time.DLL (Local)
Enabled: 0 (Local)
InputProvider: 1 (Local)
NtpServer (Local)
DllName: C:\WINDOWS\SYSTEM32\w32time.DLL (Local)
Enabled: 0 (Local)
InputProvider: 0 (Local)
VMICTimeProvider (Local)
DllName: C:\WINDOWS\System32\vmictimeprovider.dll (Local)
Enabled: 0 (Local)
InputProvider: 1 (Local)