# Linux PTP versions on the Ouster Sensor

**URL:** <https://community.ouster.com/t/linux-ptp-versions-on-the-ouster-sensor/102>\
**Category:** Software\
**Tags:** ptp, time-synchronization, firmware\
**Created:** [May 16, 2024, 5:21pm UTC](https://community.ouster.com/t/linux-ptp-versions-on-the-ouster-sensor/102 "2024-05-16T17:21:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbear](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.ouster.com/kbear/32/62_2.png) [@kbear](https://community.ouster.com/u/kbear)\
**Post date:** [May 16, 2024, 5:21pm UTC](https://community.ouster.com/t/linux-ptp-versions-on-the-ouster-sensor/102/1 "2024-05-16T17:21:44Z")

</div>

The Ouster sensors achieve PTP time synchronization through the use of verbatim Linux PTP (aka ptp4l).

# LinuxPTP versions

Here are the linuxptp versions listed by Ouster firmware version:

- Ouster FW v3.0.1:
  - `linuxptp cortexa53 3.1.1`

- Ouster FW v3.1.0:
  - `linuxptp cortexa53 4.1`

# Patch for protocol version

Additionally, there is a recommended patch for customers to force their client PTP\_VERSION (protocol version not linuxptp version) to 2.0 instead of 2.1.

Ouster sensors advertise v2.0 linuxptp _protocol_ to avoid customer compatibility problems with post v4.0 linuxptp versions

Here is a [link](https://sourceforge.net/p/linuxptp/mailman/linuxptp-devel/thread/20210221153233.GA26452%40hoboy.vegasvil.org/#msg37224462) to the source/fix of the problem in the PTP mailing list.

Date: Mon, 2 Oct 2023 11:28:37 -0700  
Subject: [PATCH] msg: rollback PTP\_VERSION to 2.0 to workaround hw issues

- Many devices have issues with timestamping inbound/outbound packets  
with the version set v2.1 which results in breakage.
- Rolling this back seems to have almost no impact other than we  
advertise a lower version.
- Introduced by commit: 2a2532d66121d0060b042c5bd6020a62153f1e0a

```auto
---
msg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/msg.h b/msg.h
index 484435d..ffc49d4 100644
--- a/msg.h
+++ b/msg.h
@@ -32,7 +32,7 @@
 
 # Version definition for IEEE 1588-2019 
 #define PTP_MAJOR_VERSION	2
-#define PTP_MINOR_VERSION	1
+#define PTP_MINOR_VERSION	0 /* BUG: rollback for customer hw compatibility */
#define PTP_VERSION (PTP_MINOR_VERSION << 4 | PTP_MAJOR_VERSION)
#define MAJOR_VERSION_MASK	0x0f`

--
2.34.1

```
