Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Seperation of sat clock code



On 29 Apr 2002, Rainer Zocholl (RZ) wrote:

RZ> Once upon a time Sergei Haller shaped the electrons to say...
RZ>
RZ> >The reason I never sent it is the following: the ntp clients use the
RZ> >Network Time Protocol (RFCs 958, 1059, 1119, 1305), which is _MUCH_
RZ> >more complicated than the Time Protocol (RFC 868). So I don't know if
RZ> >it is possible to tell an ntp client to use the Time Service at Port
RZ> >37. (but probably we could just ask the authors)
RZ>
RZ> Maybe speak to the XNTP-guys to implement a "satelite clock device"
RZ> to the (X)NTP-Package?

I don't know if this is possible at all. :(

because the times delivered by the NTP protocol have to be exact up to
milliseconds (or even microseconds, I can't recall that right now)
I don't know in which format the time is broadcasted in DVB streams, but
assume as simple as "YYYY MM.DD hh:mm:ss" or something like that.

even more, the ntp protocol has to measure the (network) transfer time
from the time server to the client. So in our case this would be the
transfer time from the broadcasting server via the satellite in the sky
and to the DVB card. I doubt it's possible to measure that. (again: to
measure in milliseconds)

So probably creating a _real_ ntp clock driver is already not possible
from the theoretical point of view.


RZ> Adding the full NTP-server into VDR would be [...] of cause overkill.

I agree on that.


RZ> Maybe it would be sufficient to "offer" the time [...] at
RZ> port 37 so the special "ntp-vdr-clock-device" can read it

that was my idea - an ntp clock driver which reads from port 37 as defined
by RFC 868 (time protocol)

RZ> and offer it via XNTP at port 123?

no. -- by the same reasons as above.


RZ> The ntp-protokoll should allow (AFAIK) to mark the time delivered as
RZ> "not reliable yet" if the trusted channel is not selected.

yes. in case of the time protocol (on port 37) the server just closes
connection.


RZ> >[...] So I don't know if it is possible to tell an ntp client to use
RZ> >the Time Service at Port 37. (but probably we could just ask the
RZ> >authors)

the Time Protocol is defined by RFC 868 (two (!) ascii pages)

The main part of the implementation is the small peace of code I sent
earlier in this thread, of course we would have to extend it to check if a
trusted transponder is tuned at the moment (a simple if-expression?)

But most probably this would require another thread listening on port 37
and I don't have enough programming experience to do that, so this would
have to be done by someone else.

@Klaus: if you agree to include the time service to vdr, I'll contact ntp
people and ask them if (and how) it is possible to tell an ntp client to
get the time on that port via that protocol.



c ya
        Sergei
--
--------------------------------------------------------------------
         eMail:       Sergei.Haller@math.uni-giessen.de
--------------------------------------------------------------------
Be careful of reading health books, you might die of a misprint.
                -- Mark Twain





Home | Main Index | Thread Index