Main Site Documentation

TimeService not implemented


#1

It seems that everytime I try to get back into writing code for the NETMF, I run into issues. I have yet to try to do something that seems to work 100% as advertised.

Anyway. Now I get this:

Exception System.NotImplementedException - 0xca000000 (5)

#### Message: 
#### Microsoft.SPOT.Time.TimeService::set_Settings [IP: 0000] ####
#### ObservastoryControlSystem.Display.InitializationWindow::SyncronizingSystemTime [IP: 0059] ####

A first chance exception of type ‘System.NotImplementedException’ occurred in Microsoft.SPOT.Time.dll
An unhandled exception of type ‘System.NotImplementedException’ occurred in Microsoft.SPOT.Time.dll

This is on the FEZRaptor With the simple line of code of:



This used to work (however the UDP code did not so it was broken in that regard).

I'm starting to think I need to scrap NETMF and find other solutions.


Roy

#2

i use something like this


Imports Microsoft.SPOT.Time


    Private Sub NtpTimeRequest()
        Dim tsSettings As New TimeServiceSettings

        tsSettings.AutoDayLightSavings = True
        tsSettings.ForceSyncAtWakeUp = True
        tsSettings.PrimaryServer = {134, 130, 4, 17}
        tsSettings.AlternateServer = {129, 69, 1, 153}
        tsSettings.RefreshTime = 3600
        TimeService.Settings = tsSettings
        TimeService.SetTimeZoneOffset(60)

        TimeService.Start()

    End Sub


#3

My code is basically the same. Its when the “Settings” property on TimeService gets called that the error happens.

I would suspect this is specific to the FEZRaptor…

Roy


#4

@ Roy, yea we know how you feel sometimes. But then we look at the barren wilderness outside of .netmf… and the feeling just passes.

What were you trying to achieve using the TimeService?


#5

Setting the time !? :think:


#6

LOL… Yea… something like that.

I ended up finding the “FixedTimeService” that was posted on Codeshare. It works perfect.

Roy


#7

TimeService is not currently implemented in the G400. It will be in the next firmware however.


#8

snicker

If only there were other embedded platforms out there…

https://www.google.com/search?q=arduino+ntp


#9

Exactly, there aren’t any others.


#10


#11

@ John > Any idea when we can expect a firmware update that fixes the timeservice issue.

Additional offtopic newbie question;

Is there any place where you can trace/follow upcoming firmware/modules/core updates?


#12

There is a list of known issues in the firmware readme file (installed with SDK) and there is the Task Tracker in community section.
But there is no information which issue/feature is planned for next SDK or when SDK release is planned.


#13

Thanks to point that out!

Additional question on the timeservcie;

Is the FixedTimeService mentioned a valid alternative for the raptor or is the firmware issue blocking the entite netmf timeservice? Ask this because for one I really need the correct time running on the raptor and seeing that FixedTimeService uses Timeservice just thuoght I’d ask


#14

It’s a full implementation of the TimeService so it is a good replacement.

Roy


#15

I tried to make it identical and complete.
In SetUtcTime, it does call TimeService.SetUtcTime because it does more than Microsoft.SPOT.Hardware.Utility.SetLocalTime. (it adjusts uptime and probably some other things) But TimeService.SetUtcTime seems to work fine.
The big fixes are (1) non-blocking and (2) generic daylight saving solution.