I am using ptp4l on linux machine. Currently, in the pcap trace I can see that the flag for PTP_Timescale is set to False. Is there anyway, that I can configure the PTP_Timescale parameter and set it to True?
The pmc
tool may be the answer you are looking for (I think the pmc
tool is included in the linuxptp package).
First Step:
Let's try and read your current configuration using the pmc
tool:
sudo pmc -u -b 0 'GET GRANDMASTER_SETTINGS_NP'
You should get a response in this structure:
sending: GET GRANDMASTER_SETTINGS_NP
020e06.fffe.814208-0 seq 0 RESPONSE MANAGEMENT GRANDMASTER_SETTINGS_NP
clockClass 255
clockAccuracy 0x21
offsetScaledLogVariance 0x436a
currentUtcOffset 37
leap61 0
leap59 0
currentUtcOffsetValid 1
ptpTimescale 0
timeTraceable 0
frequencyTraceable 0
timeSource 0xa0
Second Step:
Let's modify the timeTraceable
flag to 1 using a pmc
command (please note that I'm not changing the other flags - I'm writing the same values I've just read, except the timeTraceable
that we want to change):
sudo pmc -u -b 0 "SET GRANDMASTER_SETTINGS_NP clockClass 255 \
clockAccuracy 0x21 offsetScaledLogVariance 0x436a \
currentUtcOffset 37 leap61 0 leap59 0 currentUtcOffsetValid 1 \
ptpTimescale 1 timeTraceable 0 frequencyTraceable 0 \
timeSource 0xa0"
I hope this will do the job. If it doesn't help, try have a look at this links for more details:
pmc man page
pmc example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With