Link to home
Start Free TrialLog in
Avatar of digitalwav
digitalwavFlag for United States of America

asked on

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

Avatar of digitalwav
digitalwav
Flag of United States of America image

ASKER

Also this is the reference page that MS provides:

https://msdn.microsoft.com/en-us/library/ms884926.aspx
Avatar of Frank Helk
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
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.
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?
SOLUTION
Avatar of Frank Helk
Frank Helk
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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 ...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry - no. I've had some experience with air guns years ago, but not with guns driven by Windows Mobile ... ;-)
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!!
You're welcome ... sorry that my hints didn't help more.

Just curious: Have you tried to contact suppliers support for that issue ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
that was one of the first things to try. no time command on these. very limited subset of the net command.
No solution found, hopefully if someone does find a solution based on our discussion they will share it with us.