How to Set Date/Time on Windows Mobile 5.0 Devices

We have a lot of Motorola MC9000 Windows Mobile 5.0 devices and we need to automatically set the date/time on them. I've tried all the registry settings that MS recommends. Below is what we have. The problem is that it doesn't work. These are fresh factory loaded RF guns   The official System info says Windows CE Version 5.0 Build 1400.

Any help would be appreciated. If there is a way to do this w/o registry settings that's ok too, but from what we've found .reg files are the only way to persistently load settings into these.

[HKEY_LOCAL_MACHINE\Services\TIMESVC]
"refresh"=dword:00001388
"recoveryrefresh"=dword:00002710
"threshold"=dword:00002710
"Server"="pool.ntp.org"
"Trustlocalclock"=dword:00000000
"ServerRole"=dword:00000000
"Order"=dword:00000063
"Dll"="timesvc.dll"
"Clientonly"=dword:00000001
"Context"=dword:00000000
"Keep"=dword:00000001
"Prefix"="NTP"
"Index"=dword:00000000
"AutoUpdate"=dword:1

Open in new window

LVL 1
digitalwavIT Infrastructure ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

digitalwavIT Infrastructure ManagerAuthor Commented:
Also this is the reference page that MS provides:

https://msdn.microsoft.com/en-us/library/ms884926.aspx
frankhelkCommented:
Hmmm ... in your settings list the parameter "server" points to "pool.ntp.org".

The documentation of pool.ntp.org at http://www.pool.ntp.org/de/use.html implies that this not a valid server address ... I'd try one of these alternatives:

For the first server in the "worldwide" set:
"Server"="0.pool.ntp.org"

Open in new window


For the first server in some (more or less) local set one of these (or similar built) settings (see here for more info):
"Server"="0.de.pool.ntp.org"
"Server"="0.europe.pool.ntp.org"
"Server"="0.fr.pool.ntp.org"
"Server"="0.es.pool.ntp.org"
"Server"="0.de.pool.ntp.org"
"Server"="0.north-america.pool.ntp.org"
"Server"="0.us.pool.ntp.org"
(...)

Open in new window


For some "international" set redundancy (not fully sure about syntax for multiple values):
"Server"="0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org"

Open in new window


You could surely try mixed variations of the above and/or follow the guidelines at http://pool.ntp.org
digitalwavIT Infrastructure ManagerAuthor Commented:
I'll change that line and try it and see what happens. I am not certain that the issue is related to the server specifically but it's a good starting point. One of the previous configurations had a server ip hard coded. I didn't check to see that it was valid but this should eliminate that potential issue.
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

digitalwavIT Infrastructure ManagerAuthor Commented:
No go on the change to the server name. I don't even know how to verify that it's trying or running the update. The Reg file seems to be applied as the time zone is set properly and when the reg file is removed the time zone is incorrect.

Any other ideas?
frankhelkCommented:
I've taken a 2nd look at the settings ....

the referecs you've mentioned describes "Refresh" ans the interval between sync's in milliseconds. If I treat the given value as HEX, it equals to 5000 ms sync cycle - that's quite a bit short. For critical systems in Windows I set the interval to 64 seconds (dword:0000FA00) - and that's already a very short interval (even 600s (dword:927C0) would be pretty nice ... and I'd recommend that value).

Same argument for recoveryrefresh ... try thet with 64 seconds.

I think the threshold setting is too small, too - the clock would not be corrected if the step would exceed this value ... it's set to 10 seconds, which is quite small. Try to increase that value generously.

Maybe that helps ?
digitalwavIT Infrastructure ManagerAuthor Commented:
I'll try it in hex. I normally do clock updates no more than 24 hours apart but in milliseconds that's a huge number.
frankhelkCommented:
Sure a big number ... 864000000 or dword:337F9800.

The clock update cycle depends on how accurate the built-in clock is and how exact the time of the device needs to be. If the only need is to display proper time to the user, a SNTP sync once a day would be a pretty tight cycle if the built-in clock isn't totally crappy.
digitalwavIT Infrastructure ManagerAuthor Commented:
So far nothing has word. The settings set forth above cause the gun to lock up requiring a reboot. The original set time reg file is pasted below. this one properly sets the time zone but no updates are taken. My next step is to readjust the refresh timers. I don't expect the internal clocks to be accurate as the rtc battery isnt' always charged or there. I just need them to update on boot and/or once a day.

[HKEY_LOCAL_MACHINE\Services\TIMESVC]
"refresh"=dword:927C0
"recoveryrefresh"=dword:927C0
"threshold"=dword:927C0
"Server"="o.pool.ntp.org"
"Trustlocalclock"=dword:00000000
"ServerRole"=dword:00000000
"Order"=dword:00000099
"Dll"="timesvc.dll"
"Clientonly"=dword:000000001
"Context"=dword:00000000
"Keep"=dword:00000001
"Prefix"="NTP"
"Index"="0"

[HKEY_LOCAL_MACHINE\Time Zones]
@ = "EST"

[HKEY_LOCAL_MACHINE\Microsoft\Clock]
"AutoDST" =dword:0

[HKEY_LOCAL_MACHINE\Time]
[HKEY_LOCAL_MACHINE\Time]
"TimeZoneInformation" = hex:\
      2c,01,00,00,45,00,61,00,73,00,74,00,65,00,72,00,6e,00,20,00,53,00,74,00,61,\
      00,6e,00,64,00,61,00,72,00,64,00,20,00,54,00,69,00,6d,00,65,00,00,00,00,00,\
      00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0b,00,00,00,01,\
      00,02,00,00,00,00,00,00,00,00,00,00,00,45,00,61,00,73,00,74,00,65,00,72,00,\
      6e,00,20,00,55,00,53,00,20,00,44,00,61,00,79,00,6c,00,69,00,67,00,68,00,74,\
      00,20,00,54,00,69,00,6d,00,65,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
      00,00,00,00,03,00,00,00,02,00,02,00,00,00,00,00,00,00,c4,ff,ff,ff

Open in new window

frankhelkCommented:
OK - the settings for refresh, recoveryrefresh and threshold amount to 600 seconds, which seems to be an acceptable value. There's only one thing which seems not to be according to the ref page mentioned above ... the description for recoveryrefresh reads
Specifies the time, in milliseconds, until next synchronization if the previous attempt failed. This is ignored in server-only mode.

RecoveryRefresh :
(REG_DWORD)
Specifies the time, in milliseconds, until next synchronization if the previous attempt failed. This is ignored in server-only mode.
Note   The time specified for this key must be less than the time specified for the Refresh key.

I don't know if that's a show-stopper, but maybe ... just try to set it to half the vaue of refresh, which is dword:493E0 (300000 dez)
digitalwavIT Infrastructure ManagerAuthor Commented:
Changing the refresh times didn't make a difference. I can drop to a command prompt on the gun and ping the 0.pool.ntp.org so it's not like the gun can't reach out.  The time zone gets set properly from the registry file but its like it won't load the dll or something.

These are all fresh loads of CE with the only mod being the wifi info. I am at a loss at this point.
frankhelkCommented:
It was just an idea with these refesh times ... I presume you have tested with recoveryrefresh set to half the value of refresh, too ...

I'm a bit out of options, too. You can ping 0.pool.ntp.org ... is there a chance that a firewall is allowing ping but blocking NTP ports ?

A very desperate thing: Do you have a chance to monitor the network traffic of the devices ? You could probably have a look at that to see if a device spits out NTP requests and look if there are answers dropping in ...

Another try: Take a device home and pair it with your home WiFi access point. Check what happens with NTP. If it works, the problem is in the corporate net. If not, it's the device.

Next try: Install a NTP client on a regular workstation (see my article on NTP). Try to sync it with 0.pool.ntp.org. See what happens ...

BTW: Timezone settings don't bother NTP ... anything that NTP knows is UTC (UT1, to be precise). Anything else (timezone, DST, etc.) is an icing on top, provided by the OS itself.
digitalwavIT Infrastructure ManagerAuthor Commented:
Interesting idea. I can pair with with a cellular jetpack to test the connectivity issue. The firewall doesn't block any outbound traffic. All of the windows servers and network equipment use external NTP to get time successfully.

I can't imagine that I'm the only one with this issue. These guns are used by Walmart and Home Depot by the thousands. how do they set the time on the device? I hate to think I have to write an app to do it. I see lots of references on how to code an app to do it but it should do it natively I would think.
frankhelkCommented:
Hmmm - besides of the question "Do the Walmart devices really need correct time ?", I suspect that Windows Mobile still contains some incarnation of W32time which could sync to a DC without using NTP ...
digitalwavIT Infrastructure ManagerAuthor Commented:
The DHCP information the devices pick up do contain records that point to the DC time servers, while that works for other devices it doesn't appear to work for these.

Do you know of any logging that may exist on the guns that may help?
frankhelkCommented:
Sorry - no. I've had some experience with air guns years ago, but not with guns driven by Windows Mobile ... ;-)
digitalwavIT Infrastructure ManagerAuthor Commented:
I guess I'll close this. I can't seem to find an answer from anyone, you've been a great help for ideas but nothing seems to work properly.

Thanks for your time!!
frankhelkCommented:
You're welcome ... sorry that my hints didn't help more.

Just curious: Have you tried to contact suppliers support for that issue ?
digitalwavIT Infrastructure ManagerAuthor Commented:
I did. They don't know either. Motorola/Symbol want money to open a case on it. It's not worth all that and my guess is they don't know either.
digitalwavIT Infrastructure ManagerAuthor Commented:
I'm going to close w/ assisted w/o solution. I don't know what else to do. I realise these are mini versions of windows but should have some basic functionality but manually setting the date/time shouldn't be one of them. Additionally the Microsoft and Motoroloa registry settings should work but don't .

Thanks for your help.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
frankhelkCommented:
Just a last thought, even with all poinks already designated to me ... I don't know if the devices have net.exe and some equivalent to the AT command on board. If it's there, you probably could brute-force-circumvent NTP by doing cyclic background calls of

     net time <ip_of_dc> /SET

or

    net time /DOMAIN:yourdomain /SET
digitalwavIT Infrastructure ManagerAuthor Commented:
that was one of the first things to try. no time command on these. very limited subset of the net command.
digitalwavIT Infrastructure ManagerAuthor Commented:
No solution found, hopefully if someone does find a solution based on our discussion they will share it with us.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.