Windows – Motorola MC3190 – Windows CE 6.0 configure device time through registry

bootntpwindows cewindows-registry

I have to configure a Motorola MC3190 running Windows CE 6.0 to use a time server to automatically set the time after a cold boot, including the timezone.

This is my current configuration, found in Timereg.reg under the Application section on the device:

REGEDIT4

[HKEY_LOCAL_MACHINE\Services\Timesvc]
"Treshold":REG_DWORD
"Threshold"=5265C00
"RecoveryRefresh":REG_DWORD
"RecoveryRefresh"=36EE80
"Refresh":REG_DWORD
"Refresh"=5265C00
"Server":REG_MULTI_SZ
"Server" = "0.be.pool.ntp.org 1.be.pool.ntp.org 2.be.pool.ntp.org 3.be.pool.ntp.org" 
"ServerRole":REG_DWORD
"ServerRole" = 0
"Trustlocalclock":REG_DWORD
"Trustlocalclock" = 0 
"Keep":REG_SZ
"Keep"=1

[HKEY_LOCAL_MACHINE\nls]
"DefaultLCID" : REG_DWORD
"DefaultLCID" = 2060 

[HKEY_LOCAL_MACHINE\nls\overrides]
"LCID" : dword
"LCID" = 2060

[HKEY_LOCAL_MACHINE\Time]
"@": REG_SZ
@ = "Romance Standard Time"

[HKEY_LOCAL_MACHINE\Time Zones]
"@": REG_SZ
@ = "Romance Standard Time"

[HKEY_LOCAL_MACHINE\Time Zones\Romance Standard Time]
"MUI_Display"="@tzres.dll,-300"
"TZI"=hex:c4,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,03,00,00,\
  00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00
"Std"="Romance (standaardtijd)"
"MUI_Std"="@tzres.dll,-302"
"Dlt"="Romance (zomertijd)"
"MUI_Dlt"="@tzres.dll,-301"
"Display"="(UTC+01:00) Brussel, Kopenhagen, Madrid, Parijs"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Clock]
"AutoDST" : REG_DWORD
"AutoDST" = 0 

I'm trying to set it up so that the machine contacts the time servers on a cold boot, but it doesn't work. The timezone is set properly to Romance Standard Time, but the time on boot on cold boot remains January 1st 2009 12:00 AM. I'm fairly sure that there are no NTP requests sent (wireshark doesn't show any from the device), so there's something wrong with the configuration. I don't know what though, I configured everything as it should be. Where am i going wrong?

Edit:

I figured out what the problem was. It turns out that the device does not contact the NTP server if it's still in the cradle. if you remove it from the cradle, it no longer has this issue.

The issue I currently have is that there's a problem with the timezone: it is off by 7 hours. It appears like it's based on the Texas timezone, where this machine apparently was made. is there a way to change this?

Update:

After some more testing, We figured out that the timezone change was applied properly after the first warm reboot after a cold boot. We don't know why this happens though. We've tried multiple combinations of sequences of registry files, but that was a long shot in itself. Does anyone know why this happens and how we can change this?

Best Answer

After some testing, We figured out that the new registry settings aren't imported into the registry settings until AFTER the timezone is set. so the device does a cold boot, reads the registry, sets the timezone value, THEN imports the registry settings. Of course, this meant that the time was still based on the old registry setting.

We fixed this by writing a small program that automatically does a warm reboot after a cold boot, so the registry is configured properly.

Related Question