Linux
Warning
For MultiSense firmware versions earlier than 7.X, linuxptp versions 1.X or 3.X are required for PTP sync. 4.X versions of linuxptp will not properly sync the the MultiSense’s onboard PTP implementation
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]