Main Site Documentation

NTP Time issue


#1

Does anyone know any possible reasons why my GetNTPTime() function works when using WiFi (with the WiFiRS9110 class), but not when directly connected with a cable (with the EthernetBuiltIn class). The GetNTPTime() creates an IPEndPoint, uses a Udp socket to connect, and sends the data on that socket. When using an ethernet cable, Socket.Receive(NtpData) times out, but it works correctly with WiFi.

Any help would be appreciated


#2

@ kkalk - Welcome to the forum.

What release of the GHI SDK are you using.

I believe there are issues with NTP and the Nov 29th SDK release.

A new SDK should be released soon. NTP is supposed to be fixed in the 4.2.8 SDK.


#3

Thanks for the quick response. According to the release notes, I’m using SDK Version 0.0.6 (October 24, 2012) that includes GHI Premium NETMF Library v4.2.5.0


#4

You should always be using the most recent SDK. You are at least two versions behind.


#5

There are several Issues in 4.2.x with UDP and the buitin NTP.
4.2.8 (current beta) has fixed this. I think it will be released today.
http://www.tinyclr.com/forum/topic?id=10651&page=4#msg108823


#6

Even with the latest firmware the TimeService doesn’t work with a Cerberus, but does work very nicely with a Spider.

I should also mention that my experiments seem to indicate that the Cerberus would rather you use socket 6 for connecting the ENC28 module as 5 doesn’t seem to work as well for me.


using System;
using System.Net;
using GHI.Premium.Net;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Time;

namespace SpiderJ11DTimeService
{
    public partial class Program
    {
        private const int localTimeZone = -7*60;
        private static readonly EthernetBuiltIn ethernet = new EthernetBuiltIn();
        private int daylightSavingsShift;

        // This method is run when the mainboard is powered up or reset.   
        private void ProgramStarted()
        {
            Debug.Print("Program Started");

            ethernet.CableConnectivityChanged += ethernet_CableConnectivityChanged;
            ethernet.NetworkAddressChanged += ethernet_NetworkAddressChanged;

            if (!ethernet.IsOpen)
                ethernet.Open();

            if (!ethernet.NetworkInterface.IsDhcpEnabled)
            {
                ethernet.NetworkInterface.EnableDhcp();
            }

            if (ethernet.IsCableConnected)
            {
                NetworkInterfaceExtension.AssignNetworkingStackTo(ethernet);
            }

            char_Display.SetCursor(0, 0);
            char_Display.PrintString(ethernet.NetworkInterface.IPAddress);
        }

        private void ethernet_NetworkAddressChanged(object sender, EventArgs e)
        {
            Debug.Print(ethernet.NetworkInterface.IPAddress);

            char_Display.Clear();
            char_Display.PrintString(ethernet.NetworkInterface.IPAddress);

            UpdateTime();

            DateTime now = DateTime.Now;

            char_Display.Clear();
            char_Display.PrintString(now.ToString("yyyy/MM/dd"));
            char_Display.SetCursor(1, 0);
            char_Display.PrintString(now.ToString("HH:mm:ss"));
        }

        private void ethernet_CableConnectivityChanged(object sender, EthernetBuiltIn.CableConnectivityEventArgs e)
        {
            if (ethernet.IsCableConnected)
            {
                NetworkInterfaceExtension.AssignNetworkingStackTo(ethernet);
            }
            else
            {
                Debug.Print("Ethernet cable is disconnected");
            }
        }


        private void UpdateTime()
        {
            try
            {
                var NTPTime = new TimeServiceSettings();
                NTPTime.AutoDayLightSavings = true;
                NTPTime.ForceSyncAtWakeUp = true;
                NTPTime.RefreshTime = 3600;
                //Thread.Sleep(1500);
                NTPTime.PrimaryServer = Dns.GetHostEntry("2.ca.pool.ntp.org").AddressList[0].GetAddressBytes();
                NTPTime.AlternateServer = Dns.GetHostEntry("time.nist.gov").AddressList[0].GetAddressBytes();
                //Thread.Sleep(1500);
                TimeService.Settings = NTPTime;
                TimeService.SetTimeZoneOffset(localTimeZone); // MST Time zone : GMT-7
                TimeService.SystemTimeChanged += onSystemTimeChanged;
                TimeService.TimeSyncFailed += onTimeSyncFailed;
                TimeService.Start();
                //Thread.Sleep(500);
                TimeService.UpdateNow(0);
                //Thread.Sleep(9000);
                Debug.Print("It is : " + DateTime.Now.ToString());

                DateTime time = DateTime.Now;

                Utility.SetLocalTime(time);
                TimeService.Stop();
            }
            catch (Exception ex)
            {
                Debug.Print(ex.Message);
            }
        }

        private void onSystemTimeChanged(Object sender, SystemTimeChangedEventArgs e)
            // Called on successful NTP Synchronisation
        {
            DateTime now = DateTime.Now; // Used to manipulate dates and time

            #region Check is we are in summer time and thus daylight savings apply

            // Check if we are in Daylight savings. The following algorythm works pour Europe and associated countries
            // In Europe, daylight savings (+60 min) starts the last sunday of march and ends the last sunday of october

            var aprilFirst = new DateTime(now.Year, 4, 1);
            var novemberFirst = new DateTime(now.Year, 11, 1);
            var sundayshift = new[] {0, -1, -2, -3, -4, -5, -6};
            int marchLastSunday = aprilFirst.DayOfYear + sundayshift[(int) aprilFirst.DayOfWeek];
            int octoberLastSunday = novemberFirst.DayOfYear + sundayshift[(int) novemberFirst.DayOfWeek];

            if ((now.DayOfYear >= marchLastSunday) && (now.DayOfYear < octoberLastSunday))
                daylightSavingsShift = 60;
            else
                daylightSavingsShift = 0;

            TimeService.SetTimeZoneOffset(localTimeZone + daylightSavingsShift);

            #endregion

            // Display the synchronized date on the Debug Console

            now = DateTime.Now;
            string date = now.ToString("dd/MM/yyyy");
            string heure = now.ToString("HH:mm:ss");
            Debug.Print(date + " // " + heure);
        }

        private void onTimeSyncFailed(Object sender, TimeSyncFailedEventArgs e)
            // Called on unsuccessful NTP Synchronisation
        {
            Debug.Print("NTPService : Error synchronizing system time with NTP server");
        }
    }
}


#7

@ Duke Nukem

Do you have an error during execution ?


#8

Nope but here is a Fez Spider Output Window from a debug run. One thing that I have done that might be a tad out of the unusual is I just have my J11D module sitting in my Gadgeteer layout (ie not connected) as then I don’t get a startup error about the module being connected to socket 7, but I still get my references (ya I’m lazy and could add those manually).


Found debugger!

Create TS.

 Loading start at a0e00000, end a0e1383c

   Assembly: mscorlib (4.2.0.0)     Assembly: Microsoft.SPOT.Native (4.2.0.0)     Assembly: Microsoft.SPOT.Security.PKCS11 (4.2
.0.0)     Assembly: System.Security (4.2.0.0)  Loading Deployment Assemblies.

Attaching deployed file.

   Assembly: GTM.GHIElectronics.Display_HD44780 (1.1.2.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.Net.Security (4.2.0.0)  Attaching deployed file.

   Assembly: Gadgeteer (2.42.0.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.Graphics (4.2.0.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.TinyCore (4.2.0.0)  Attaching deployed file.

   Assembly: Gadgeteer.WebServer (2.42.0.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.Hardware (4.2.0.0)  Attaching deployed file.

   Assembly: System.Http (4.2.0.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.IO (4.2.0.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.Time (4.2.0.0)  Attaching deployed file.

   Assembly: System (4.2.0.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.Net (4.2.0.0)  Attaching deployed file.

   Assembly: System.Net.Security (4.2.0.0)  Attaching deployed file.

   Assembly: GHI.Premium.Net (4.2.8.0)  Attaching deployed file.

   Assembly: System.IO (4.2.0.0)  Attaching deployed file.

   Assembly: GHI.Premium.System (4.2.8.0)  Attaching deployed file.

   Assembly: GHI.Premium.Hardware (4.2.8.0)  Attaching deployed file.

   Assembly: GHI.Premium.IO (4.2.8.0)  Attaching deployed file.

   Assembly: SpiderJ11DTimeService (1.0.0.0)  Attaching deployed file.

   Assembly: Gadgeteer.WebClient (2.42.0.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)  Attaching deployed file.

   Assembly: GTM.GHIElectronics.Ethernet_J11D (1.1.2.0)  Attaching deployed file.

   Assembly: GHIElectronics.Gadgeteer.FEZSpider (1.1.1.0)  Resolving.

GC: 1msec 38460 bytes used, 7301208 bytes available

Type 0F (STRING              ):     24 bytes

Type 15 (FREEBLOCK           ): 7301208 bytes

Type 17 (ASSEMBLY            ):  34320 bytes

Type 1E (BINARY_BLOB_HEAD    ):   4044 bytes

Type 34 (APPDOMAIN_HEAD      ):     72 bytes

GC: performing heap compaction...

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Native.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Security.PKCS11.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.Security.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Net.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Graphics.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.TinyCore.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies\.NET Micro Framework 4.2\le\Gadgeteer.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\Display_HD44780\NETMF 4.2\le\GTM.GHIElectronics.Display_HD44780.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Net.Security.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies\.NET Micro Framework 4.2\le\Gadgeteer.WebServer.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.Net.Security.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.Http.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Time.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.Net.dll'
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.System.dll'
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.Hardware.dll'
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.IO.dll'
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\Ethernet_J11D\NETMF 4.2\le\GTM.GHIElectronics.Ethernet_J11D.dll'
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Mainboards\FEZSpider\NETMF 4.2\le\GHIElectronics.Gadgeteer.FEZSpider.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Blake\Documents\Visual Studio 2010\Projects\SpiderJ11DTimeService\SpiderJ11DTimeService\bin\Debug\le\SpiderJ11DTimeService.exe', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies\.NET Micro Framework 4.2\le\Gadgeteer.WebClient.dll', Symbols loaded.
The thread '<No Name>' (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZSpider version 1.0
Program Started
10.0.0.11
It is : 02/15/2013 16:01:20
15/02/2013 // 16:01:20
15/02/2013 // 16:01:20
The thread '<No Name>' (0x3) has exited with code 0 (0x0).



#9

Cerberus test version (ie ENC28 module)


using System;
using System.Net;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Net.NetworkInformation;
using Microsoft.SPOT.Time;


namespace CerberusTimeService
{
    public partial class Program
    {

        //NOTE with the Cerberus it does seem to matter which socket you use and my testing recommends socket 6 for connecting the ENC28 module

        private const int localTimeZone = -7*60;
        private int daylightSavingsShift;
        private NetworkInterface _ni;

        private void ProgramStarted()
        {
            Debug.Print("Program Started");

            char_Display.PrintString("Running");

            try
            {
                _ni = NetworkInterface.GetAllNetworkInterfaces()[0];

                if (!_ni.IsDhcpEnabled)
                    _ni.EnableDhcp();

                if (_ni.IPAddress != "0.0.0.0")
                {
                    char_Display.SetCursor(0, 0);
                    char_Display.PrintString(_ni.IPAddress);

                    Debug.Print("IP Address:" + _ni.IPAddress);

                    UpdateTime();

                    DateTime now = DateTime.Now;

                    char_Display.Clear();
                    char_Display.PrintString(now.ToString("yyyy/MM/dd"));
                    char_Display.SetCursor(1, 0);
                    char_Display.PrintString(now.ToString("HH:mm:ss"));
                }
                else
                {
                    char_Display.SetCursor(0, 0);
                    char_Display.PrintString(_ni.IPAddress);                   
                }
            }
            catch (Exception exception)
            {
                Debug.Print("Main " + exception.Message);
            }
        }

        private void UpdateTime()
        {
            try
            {
                var NTPTime = new TimeServiceSettings();
                NTPTime.AutoDayLightSavings = true;
                NTPTime.ForceSyncAtWakeUp = true;
                NTPTime.RefreshTime = 3600;
                //Thread.Sleep(1500);
                NTPTime.PrimaryServer = Dns.GetHostEntry("2.ca.pool.ntp.org").AddressList[0].GetAddressBytes();
                NTPTime.AlternateServer = Dns.GetHostEntry("time.nist.gov").AddressList[0].GetAddressBytes();
                //Thread.Sleep(1500);
                TimeService.Settings = NTPTime;
                TimeService.SetTimeZoneOffset(localTimeZone); // MST Time zone : GMT-7
                TimeService.SystemTimeChanged += onSystemTimeChanged;
                TimeService.TimeSyncFailed += onTimeSyncFailed;
                TimeService.Start();
                //Thread.Sleep(500);
                TimeService.UpdateNow(0);
                //Thread.Sleep(9000);
                Debug.Print("It is : " + DateTime.Now.ToString());

                DateTime time = DateTime.Now;

                Utility.SetLocalTime(time);
                TimeService.Stop();
            }
            catch (Exception ex)
            {
                Debug.Print("Update Time " + ex.Message);
            }
        }

        private void onSystemTimeChanged(Object sender, SystemTimeChangedEventArgs e)
            // Called on successful NTP Synchronisation
        {
            DateTime now = DateTime.Now; // Used to manipulate dates and time

            #region Check is we are in summer time and thus daylight savings apply

            // Check if we are in Daylight savings. The following algorythm works pour Europe and associated countries
            // In Europe, daylight savings (+60 min) starts the last sunday of march and ends the last sunday of october

            var aprilFirst = new DateTime(now.Year, 4, 1);
            var novemberFirst = new DateTime(now.Year, 11, 1);
            var sundayshift = new[] {0, -1, -2, -3, -4, -5, -6};
            int marchLastSunday = aprilFirst.DayOfYear + sundayshift[(int) aprilFirst.DayOfWeek];
            int octoberLastSunday = novemberFirst.DayOfYear + sundayshift[(int) novemberFirst.DayOfWeek];

            if ((now.DayOfYear >= marchLastSunday) && (now.DayOfYear < octoberLastSunday))
                daylightSavingsShift = 60;
            else
                daylightSavingsShift = 0;

            TimeService.SetTimeZoneOffset(localTimeZone + daylightSavingsShift);

            #endregion

            // Display the synchronized date on the Debug Console

            now = DateTime.Now;
            string date = now.ToString("dd/MM/yyyy");
            string heure = now.ToString("HH:mm:ss");
            Debug.Print(date + " // " + heure);
        }

        private void onTimeSyncFailed(Object sender, TimeSyncFailedEventArgs e)
            // Called on unsuccessful NTP Synchronisation
        {
            Debug.Print("NTPService : Error synchronizing system time with NTP server");
        }
    }
}

Debug run



Found debugger!

Create TS.

 Loading start at 806fedc, end 8098af8

   Assembly: mscorlib (4.2.0.0)     Assembly: Microsoft.SPOT.Native (4.2.0.0)     Assembly: Microsoft.SPOT.Hardware (4.2.0.0)  
   Assembly: Microsoft.SPOT.Graphics (4.2.0.0)     Assembly: Microsoft.SPOT.TinyCore (4.2.0.0)  
   Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)     Assembly: Microsoft.SPOT.IO (4.2.0.0)  
   Assembly: System.IO (4.2.0.0)     Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)  
   Assembly: Microsoft.SPOT.Hardware.Usb (4.2.0.0)     Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)  
   Assembly: Microsoft.SPOT.Net (4.2.0.0)     Assembly: System (4.2.0.0)  Loading Deployment Assemblies.

Attaching deployed file.

   Assembly: GTM.GHIElectronics.Display_HD44780 (1.1.2.0)  Attaching deployed file.

   Assembly: GHI.OSHW.Hardware (4.2.3.1)  Attaching deployed file.

   Assembly: Gadgeteer (2.42.0.0)  Attaching deployed file.

   Assembly: GHIElectronics.Gadgeteer.FEZCerberus (1.1.2.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.Time (4.2.0.0)  Attaching deployed file.

   Assembly: CerberusTimeService (1.0.0.0)  Resolving.

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Native.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Graphics.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.TinyCore.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.OneWire.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Net.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies\.NET Micro Framework 4.2\le\Gadgeteer.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\Display_HD44780\NETMF 4.2\le\GTM.GHIElectronics.Display_HD44780.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI OSHW NETMF v4.2 SDK\Assemblies\le\GHI.OSHW.Hardware.dll'
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Mainboards\FEZCerberus\NETMF 4.2\le\GHIElectronics.Gadgeteer.FEZCerberus.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Time.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Blake\Documents\Visual Studio 2010\Projects\CerberusTimeService\CerberusTimeService\bin\Debug\le\CerberusTimeService.exe', Symbols loaded.
The thread '<No Name>' (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZCerberus version 1.1
Program Started
IP Address:10.0.0.13
A first chance exception of type 'System.NotSupportedException' occurred in CerberusTimeService.exe
Update Time Exception was thrown: System.NotSupportedException
The thread '<No Name>' (0x3) has exited with code 0 (0x0).


NOTE that ‘Update Time’ is my text indicating that the expection occured in the UpdateTime routine.


#10

You should try with doing the TimeService.SetTimeZoneOffset just after the update, as it has an immediate effect that I’m not sure to be appreciated as all the Start() and maybe UpdateNow() have not been done before…