精确时间协议 (PTP) 软件模式设置,以主计算机作为主时钟

精确时间协议 (PTP) 软件模式设置,以主计算机作为主时钟

我有一台 Jetson Nano 和一个以太网连接的传感器(具体来说,是一个支持 PTP 的 LiDAR),我想在它们之间设置 PTP 同步,但我对文档有点困惑(我主要想遵循https://static.ouster.dev/sensor-docs/image_route1/image_route2/appendix/ptp-quickstart.html)。我想强制 Jetson Nano 系统时钟为“主”时钟。在 Jetson Nano 上,传感器所连接的以太网端口似乎不支持硬件时间戳:

$ sudo ethtool -T eth0
Time stamping parameters for eth0:
Capabilities:
        software-transmit     (SOF_TIMESTAMPING_TX_SOFTWARE)
        software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)
        software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes: none
Hardware Receive Filter Modes: none

所以我尝试以软件模式设置 PTP 服务器。

我的设置步骤是:

sudo apt install linuxptp chrony ethtool

sudo nano /etc/linuxptp/ptp4l.conf 
# set `priority1` and `priority2` to `0` so that the Jetson Nano system clock is always the master? Is this correct?
# set `time_stamping` to `software`
# set `free_running` to `1` so that the Jetson system clock is not modified

sudo systemctl daemon-reload
sudo systemctl restart ptp4l

这是设置 PTP 服务器以使用 Jetson 系统时钟作为主时钟的正确方法吗?phc2sys 有什么用?

相关内容