Get current date & time from network?

When I switch my phone on, it automatically sets its clock from the network.

How can this be done with Open-AT?

I have seen the Open-AT sample that sends itself an SMS, but my phone does this without needing to send an SMS - how can Open-AT do the same?

NITZ (Network Information and Time Zone) is mentioned in the AT Commands manual, but there’s no real description of what it provides, nor how to use it :frowning:

OK, so I came across the AT+WLOC command:

One of its response parameters is

But what is “STLK Format”?
No mention of it anywhere in any of the Wavecom documents. :frowning:

After a bit of guessing, I stumbled upon “SIM TooLKit”

Still no description anywhere in any Wavecom documentaion of the date & time format used by the SIM Toolkit! :frowning: :frowning:

A trawl through the GSM Recs found this:

So I tried AT+WLOC - and it just said ERROR.
The AT Commands manual says

Does it tell you how to activate “the location feature”? Of course not! :angry:

More searching finds it under the AT+WFM command:
AT+WFM=1,C

Finally - I can get a +WLOC: response!

And the date+time is: 980102172544ff

So that’ll be 2 Jan 1998 - useless! :angry: :angry:

This must be a default value - but how to set the proper value?

Hi, just came across your post. I am looking at something similar. This is proabably too late for you though. Subscribe to the +WIND: 15 unsolicited response. It gives you the time information when u connect to the network over gprs(?). its a NITZ response if that means anything.

Mark

However, the NITZ service is optional in GPRS network, so some providers may not support it.
See also:

wavecom.com/modules/movie/sc … me=Network

and search for NITZ.

OK - this is what I’ve found so far:

Using the Vodafone-UK network, GSM registration (+CREG: 1) does not give NITZ - in fact, I’ve never seen a +WIND: 15 wile using GSM only.

The first GPRS registration after startup (+CGREG: 1) does give a +WIND: 15

If the unit loses and then regains GPRS registration without a restart, it does not get a +WIND: 15.

Better to respond late than never…
In our country, Vodafone bought an older operator, and they needed to rename the network. Since then we’re getting the WIND: 15 notifications 8)
One after restart, and another after a GPRS registration, with different options.
Other operators do not send anything, ever :frowning:

In this thread, sefer presents an example of contacting an NTP server via GPRS using WIP:
wavecom.com/modules/movie/sc … =4789#4789

HI, i’m also the one who hopefully can obtain the TIME information from the GSM network.

I haved try the WLOC command also. It really useless because the time infomation are actually “copy” from the CCLK param. Which mean what ever time sote inside CCLK will be copy out.

Also, i found that the CCLK default value are not same with documented value which mean “980101,00:00:00”. :angry:

I have done some playing about with reseting my GRPS bearer daily and I found
at+cgatt=0
at+cgact=0
at+cgact=1
gets a WIND:15 response. Whether you actually want to do this is another question :open_mouth:
at+CTZU is updated then.

I think this is network-specific - so, what network were you using?

This was vodaphone. Still experimenting, but it might help someone.

Vodafone has networks all over the world - which one specifically?

It may also depend on your subscription; eg, pre-pay or contract…

sorry, UK Vodaphone, contract. the number is 23415

Hi all, have there been any further developments in the area? Can we reliably sync the modem’s time with the network’s time? This would be particularly useful, as our modem will be scattered in various countries and timezones and using the network time would resolve the timezone issue.

Alternatively if using my one NTP server, how do I know what timezone the modem is in?

Thanks,

Karl

Hiya,

NITZ is still the only way to do this without resorting to either GPS or using an external timeserver and NTP over GPRS.

If your operator doesn’t supply NITZ information, then you’re going to have to use one of the latter options.

As far as locating your modem, you could always just keep your time across your modem fleet in UTC. Or, you’re going to need the GPS. Or maybe (if you’re lucky), you could work out the details from the PLMN information (get the operator code and the cell ID and do it from there) - similar to AGPS aiding. Could be a lot of work…

Actually, I wonder if there’s any location info in PLMN information. Might be time for a look…

ciao, Dave

If you don’t need very precise time, you could have the modem send itself a text - and use the timestamps…?

Yes, I would certainly recommend that if at all possible!

Hi both, thanks for the replies. Unfortunately keeping times the same across the devices is not possible as they operate in different countries and are serviced and accessed by individuals who will expect the time to reflect their location. I guess I could do that, but I would then need to know what the timezone is so that I can adjust the time accordingly for the users.

I am now using CCED and Geolocation to track my modems (roughly). Although I think I will also implement NITZ as a comparison and alternative as I guess Geolocation will not always work / we accurate enough etc.

Thanks,

Karl