Time sync

Posted by: Aragon

Time sync - 07/06/2002 17:11

Hi,

How about some means of keeping the empeg's clock in sync? I was thinking the easiest might be to do it via emplode. Or even better, when booted from AC, run something along the lines of ntpdate once off to sync the clock to a specified ntp server. That would be cool!

I'm a sucker for accurate time keeping. Not one of my PCs isn't synced via NTP


Regards,
Aragon
Posted by: ElectricD7

Re: Time sync - 07/06/2002 17:17

I think this would be an awesome addition. I don't see Rio/Empeg coming out with a new version of emplode anytime soon though ( i could be wrong.) I may be WAY off base here, but is it possible for HiJack to use NTP to grab the time on boot when network connection is present and AC is on. This providing that the network connection has access to the outside world. I dunno....it would be cool though!
Posted by: Aragon

Re: Time sync - 07/06/2002 17:22

I'm sure it's possible with Hijack. Hey if it can run a web and ftp server...
Posted by: mlord

Re: Time sync - 08/06/2002 04:44

Hmmm.. sounds pretty frivolous.

But the more I think about it, this would be a very appropriate feature for a docked player to incorporate: making it a networked clock.

The NTP protocol can get rather complex, as it is designed for microsecond accuracy, even over links that are slower than that. But we can simplify it immensely if we're willing to just have accuracy with a second or two.

-ml
Posted by: Aragon

Re: Time sync - 08/06/2002 06:50

Hi,

Yea, I think writing a full blown implementation of the NTP protocol would be overkill. Something that starts once during bootup, syncs the clock once off with a time server and then exits would be perfect... I think

Thanks,
Aragon
Posted by: genixia

Re: Time sync - 08/06/2002 07:10

Sounds like we need ntpdate rather than a full xntpd implementation:

"ntpdate sets the local date and time by polling the Network Time Protocol (NTP) server(s) given as the server arguments to determine the correct time. It must be run as root on the local host. A number of samples are obtained from each of the servers specified and a subset of the NTP clock filter and selection algorithms are applied to select the best of these. Note that the accuracy and reliability of ntpdate depends on the number of servers, the number of polls each time it is run and the interval between runs.

ntpdate can be run manually as necessary to set the host clock, or it can be run from the host startup script to set the clock at boot time. This is useful in some cases to set the clock initially before starting the NTP daemon xntpd. It is also possible to run ntpdate from a cron script. However, it is important to note that ntpdate with contrived cron scripts is no substitute for the NTP daemon, which uses sophisticated algorithms to maximize accuracy and reliability while minimizing resource use. Finally, since ntpdate does not discipline the host clock frequency as does xntpd, the accuracy using ntpdate is limited.

Time adjustments are made by ntpdate in one of two ways. If ntpdate determines the clock is in error more than 0.5 second it will simply step the time by calling the system settimeofday() routine. If the error is less than 0.5 seconds, it will slew the time by calling the system adjtime() routine. The latter technique is less disruptive and more accurate when the error is small, and works quite well when ntpdate is run by cron every hour or two."
Posted by: tarkie

Re: Time sync - 08/06/2002 08:01

The source for ntpdate, can be found HERE and an ARM implementation Although betcha its not compatable.

Posted by: DeadFire

Re: Time sync - 08/06/2002 17:56

Now there's something I would like to have. Once my install is done I won't have any clock at all in the car. So unless the empeg can keep the correct time, I'll have to buy a watch.

I don't see how the time could be synced up from the car though. Not without some $$$.
Posted by: Roger

Re: Time sync - 10/06/2002 05:29

I have a bunch of scripts that run when I exit the player. One of them causes ntpdate to be run. Someday, I might rig them up to run from init, before the player starts.

You can find them at http://www.differentpla.net/~roger/empeg/car/files/

base.tar.gz is the binaries. configs.tar.gz is the auto-selected stuff that sets hostnames and stuff.

Posted by: smu

Re: Time sync - 10/06/2002 06:26

Hi Roger.

I would like to use your files in my customized hda2 boot .upgrade-File. Do you have any objections?
What source files did you use to built the binaries?

cu,
sven
Posted by: Roger

Re: Time sync - 10/06/2002 09:35

I don't have any objection, no.

I didn't build from source -- I downloaded the binaries from www.debian.org
Posted by: image

Re: Time sync - 13/09/2002 00:51

roger, i'm trying to make my empeg time sync at startup. i was wondering, can you put up these files again? thanks
Posted by: Roger

Re: Time sync - 13/09/2002 01:34

Fixed.
Posted by: avatarTX

Re: Time sync - 25/09/2002 12:13

My player doesn't keep very good time.. I dont use the clock in the player but I do notice the time if I scroll through the visuals. The time is seldom close to correct.

I do plug my player up to my PC about once a week.. if it synced at that time, it would be a lot more accurate. I wouldn't have to adjust the time by hand.

But again, in my case, I dont use the clock in the player, or the time display visuals.
Posted by: tfabris

Re: Time sync - 25/09/2002 12:24

The time is seldom close to correct.

How far off is it? Just a minute or two, or hours?

If the latter, make sure to read this.