I am following the following tutorial: https://tsn.readthedocs.io/timesync.html. My setup is a Ubuntu PC acting as Grandmaster, a Ubuntu laptop acting as a slave, and a switch in between them.
This doc says to update the GRANDMASTER_SETTINGS_NP message using pmc. I want to revert to the default settings.
On the man page, it doesn't seem there's an option to undo what I've just done. I understand by looking through the IEEE 1588 spec that each of the options like clockAccuracy and ptpTimescale don't necessarily have default values, so I'd just like to revert what I've done. The command I used was:
sudo pmc -u -b 0 -t 1 "SET GRANDMASTER_SETTINGS_NP clockClass 248 \
clockAccuracy 0xfe offsetScaledLogVariance 0xffff \
currentUtcOffset 37 leap61 0 leap59 0 currentUtcOffsetValid 1 \
ptpTimescale 1 timeTraceable 1 frequencyTraceable 0 \
timeSource 0xa0"
Also, I'm trying to view the GRANDMASTER_SETTINGS_NP
values. I'm using sudo pmc -u -b 0 "GET GRANDMASTER_SETTINGS_NP"
, and other people are saying I should receive a message that shows the current values, but all I see is:
sending: GET GRANDMASTER_SETTINGS_NP
with nothing after it.
Can anyone help or point me to a resource that explains how to use pmc well, other than the man page (https://linux.die.net/man/8/pmc)
try to add -d to the pmc command. Worked for me with PTP slave on Ubuntu 20.04