pendulum-project / statime

Implementation of the Precision Time Protocol (PTP) in Rust
https://trifectatech.org
Other
177 stars 20 forks source link

Plans on PTPv1 support? #382

Open teodly opened 8 months ago

teodly commented 8 months ago

Hello,

I'm developing an unofficial, reverse engineered implementation of Dante Audio over IP protocol - Inferno. It uses PTPv1 (IEEE1588-2002) so I really need to support it despite it being deprecated (technically speaking, Dante supports PTPv2, too, but not on all devices and it needs to be enabled manually).

I've already started working on implementing it in Statime, but it looks like PTPv2 assumptions and data structures are deeply rooted in the codebase (which is not surprising as the standard defines algorithms and data structures pretty precisely). So I have 2 options:

I just want to know your opinion on PTPv1 support.

If you don't want it upstream, I will probably go the converters route to make upstream changes easier to merge for me.

If you do, I don't think I will be able to contribute a complete PTPv1 support myself, as I'm doing it in my free time and don't have much experience of working with clock synchronization. But I can help with development (I've already implemented serialize & deserialize functions) and testing (I have 2 Dante devices which are PTPv1 and PTPv2 capable).

davidv1992 commented 8 months ago

My instinct would be to try and mould the codebase into a form where it could also do PTPv1. However, I don't currently have access to a version of the specification to see what this would entail. I will come back to you once I have taken a look at the PTPv1 spec and have a better idea of what this would entail.

davidv1992 commented 4 months ago

Apologies, it took me way too long to get back to you on this. Having had a look at ptpv1 and the statements on this in the ptpv2.0 spec I think the PTPv1 integration is going to be the way if you want this integrated. Feel free to make a start on this if you want, we won't in the near future start work on this however so it would most likely be mostly your implementation.