Linux
Warning
4.X versions of linuxptp which implement PTP version 2.1 (IEEE 1558-2019) will not properly sync with the MultiSense’s onboard PTP implementation.
The following line needs to be added to the /etc/linuxptp/ptp4l.conf
file on the machine acting as a PTP master
to resolve the compatability issues.
ptp_minor_version 0
Each interface which has MultiSense camera connected will need a stand-alone phc2sys service.
- The following is an example phc2sys command we use for synchronizing cameras on a specific interface
phc2sys -c <interface> -S 1 -s CLOCK_REALTIME -l7 -O 0 -m
-c <interface>
sets the sink clock to be the device<interface>
, which is populated with the connected interfaces.-S 1
indicates that the step threshold is 1 second, meaning that if the network interface’s clock lags the system clock by more than a second, then it will be adjusted via a discontinuous clock step (rather than increasing the frequency of the hardware clock to gradually catch up).-s CLOCK_REALTIME
sets the source clock to be the system’s realtime clock.-l7
enables debug logging.-O 0
indicates that the offset between the source and sink clocks is 0 seconds (meaning, they should be the same time).-m
enables printing to the standard output.
- For each of the phc2sys instances, we need a corresponding ptp4l service running on the host system.
- We run with the following configuration
ptp4l -q -f ptp4l.cfg
Here,
-q
disables logging to the system log-f ptp4l.cfg
loads the rest of the config for a specific interface.Here is an example of a
ptp4l.cfg
file configured for theenp5s0
interface.
[global]
# Ensures that the interface can only set other clocks, and cannot have its clock set by the host machine.
masterOnly 1
# More logging.
verbose 1
# Debug logging.
logging_level 7
# Specifies the time-to-live limit for multicast messages, ensuring that they can hop at most 2 subnets.
# Update depending on your network topology
udp_ttl 2
# This line changes depending on the network interface.
[enp5s0]