Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Time service UpdateNow never returns

13 views
Skip to first unread message

Armand R.

unread,
Mar 31, 2010, 6:05:45 PM3/31/10
to
I'm running the following code, and UpdateNow never returns when running on
the LPC2478 board. In the simulator it works :

TimeService.SetTimeZoneOffset(-4*60);
TimeService.Settings.PrimaryServer = new byte[] {132,246,168,148};
TimeService.Start();
TimeService.UpdateNow(10000);

Armand R.

unread,
Mar 31, 2010, 6:26:44 PM3/31/10
to
... continuing the previous fragmented post (with the solution):

Is this the correct way of using the TimeService?

update (need to provide a settings object):

TimeServiceSettings settings = new TimeServiceSettings();

settings.PrimaryServer = new byte[] { 132, 246, 168, 148 };

TimeService.Settings = settings;

TimeService.Start();

TimeService.UpdateNow(10000);

Lorenzo Tessiore

unread,
Apr 1, 2010, 1:49:02 PM4/1/10
to
Hello Armand,

your usage is correct, but the device might not be able to find a proxy to
get to the time server. Your desktop instead knows how to. Try connecting to
the time server with a socket to see if you can reach it. Or try changing
the DNS / DHCP properties to get a gateway that can dierct you better. In
the past it worked for me to set the gateway address as the proxy of your LAN.

Regards
Lorenzo

Armand R.

unread,
Apr 13, 2010, 11:45:01 AM4/13/10
to
Thanks for replying Lorenzo,

I think at start-up, the TimeServiceSettings object is null and just setting
the PrimaryServer property results in null as well. Once a proper instance
of TimerServiceSettings is added to the TimerService it works like a clock ;)
(booo! pun)

Regards,

Armand

0 new messages