EasyManua.ls Logo

Ouster OS1 - Page 94

Ouster OS1
100 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Configuringptp4l asaLocalMaster Clock
TheIEEE-1588BestMasterClockAlgorithm(BMCA)willselectagrandmasterclockbasedonanumber
ofmasters. Inmostnetworksthereshouldbeonlyasinglemaster. IntheexamplenetworktheUbuntu
machinewillbeconfiguredwithanon-defaultclockClass soitsoperationqualifiesittowintheBMCA.
Replace the default value with a lower clock class (higher priority) and restart linuxptp. Edit /etc/
linuxptp/ptp4l.conf and commentout thedefaultclockClass valueand inserta linesetting it128.
#clockClass 248
clockClass 128
Restartptp4l sotheconfigurationchange takeseffect.
$ sudo systemctl restart ptp4l
This willconfigure ptp4l to advertise amaster clockon eno2 asa clockthat will winthe BMCAfor an
OusterOS1sensor.
However, the ptp4l service is only advertising the Ethernet controllers PTP hardware clock, not the
Linuxsystemtime asis oftenexpected.
Configuringphc2sys toSynchronizetheSystemTime to the PTPClock
To synchronize the Linux system time to the the PTP hardware clock the phc2sys utility needs to be
run. The following configuration will tell phc2sys to take the Linux CLOCK_REALTIME and write that time
tothe PTP hardware clockin theEthernet controllerforeno2. These interfacesare thenconnectedto
PTPslavessuch asOusterOS1sensors.
Createa systemddrop-indirectoryto overridethesystemservice file:
$ sudo mkdir -p /etc/systemd/system/phc2sys.service.d
Createa fileat/etc/systemd/system/phc2sys.service.d/override.conf withthefollowingcontents:
[Service]
ExecStart=
ExecStart=/usr/sbin/phc2sys -w -s CLOCK_REALTIME -c eno2
Note: If multiple interfaces need to be synchronized from CLOCK_REALTIME then multipe instances of
thephc2sys serviceneedto berun asitonly acceptsa singleslave(i.e. -c) argument.
Restartthe phc2sys service sothe changetakeseffect:
$ sudo systemctl daemon-reload
$ sudo systemctl restart phc2sys
$ sudo systemctl status phc2sys
94

Table of Contents

Other manuals for Ouster OS1

Related product manuals