Linux
Warning
The MultiSense runs version 3.1.1 of linuxptp. To ensure the best compatability, it’s recommended version 3.1.1 of linuxptp is installed on the host machine. You can download the source here
You can check the installed version of linuxptp with pmc -v
Warning
4.X versions of linuxptp which implement PTP version 2.1 (IEEE 1558-2019) will not properly sync with the version 3.1.1 linuxptp onboard the MultiSense.
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 when running 4.X versions of linuxptp.
ptp_minor_version 0
Hardware PTP
Note
Ensure your network interface supports transmitting Hardware PTP corrections by running
ethtool -T <interface>
An interface which supports hardware transmitting PTP corrections will have an output which looks like:
Capabilities:
hardware-transmit
software-transmit
hardware-receive
software-receive
software-system-clock
hardware-raw-clock
PTP Hardware Clock: 0
Hardware Transmit Timestamp Modes:
off
on
Hardware Receive Filter Modes:
none
all
If hardware-transmit is not present, the network interface which you are using does
not support transmitting hardware PTP corrections. You will need to select a different network adapter, or
attempt to use software PTP corrections
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 1indicates 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_REALTIMEsets the source clock to be the system’s realtime clock.-l7enables debug logging.-O 0indicates that the offset between the source and sink clocks is 0 seconds (meaning, they should be the same time).-menables 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.cfgHere,
-qdisables logging to the system log-f ptp4l.cfgloads the rest of the config for a specific interface.Here is an example of a
ptp4l.cfgfile configured for theenp5s0interface.
[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]
Software PTP
Note
Ensure your network interface supports transmitting Software PTP corrections by running
ethtool -T <interface>
An interface which supports software transmitting PTP corrections will have an output which looks like. Note software PTP sync will provide worse synchronization than hardware PTP (i.e. on the order of 100’s of microseconds vs 10’s of microseconds)
Capabilities:
software-transmit
software-receive
software-system-clock
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes: none
Hardware Receive Filter Modes: none
If neither software-transmit or hardware-transmit are present, the network interface which you are using does
not support PTP. You will need to select a different network adapter, or update your network drivers
- The following command is used to transmit software PTP corrections over a specified interface
ptp4l -S -i <interface> -m-Senables software PTP time stamping-ispecifies the network interface to transmit software ptp corrections over-mprints logs to stdout for debugging