You can configure the Telit GM cellular modem to set its internal real-time clock to the network time and have this value automatically updated each time the module is powered on. Here are the AT commands that you need to issue (I’ve omitted the AT response codes):
AT#SELINT=2 AT#NITZ=7,0 // sync network time to internal clock AT&P0 // profile to be loaded on startup AT&W0 // store the complete profile AT#SHDN // this will turn off the modem // now power on the modem AT+CCLK? // get current time // time response is +CCLK: "09/06/29,15:25:32-28" // time format is yy/MM/dd,hh:mm:ss±zz
The command AT#NITZ=7,0
on your specific modem may not work, check the range of valid inputs for this command using AT#NITZ=?
. If you’ve an old module from sparkfun.com then AT#NITZ=?
may return #NITZ:(0-1),(0-7)
. More recent firmwares return #NITZ:(0-7)(0,1)
. If you’ve an older firmware, then you should set the AT#NITZ=1,0
. The difference is that with newer firmware, you will also get the time-zone zz
, not so with the older firmware. If you set AT#NITZ=7,1
, then when the module gets the network time it is supposed to be echoed as an unsolicited message on the serial port. This didn’t work in my tests. Just as well. In this case, I rather not deal with unsolicited messages for network time, since I can use the real-time clock to get the time when I want to (getting unsolicited messages for AT+CREG
is valuable, however).
What do I mean by older firmware? The GM862 module that I bought from sparkfun.com has this firmware:
AT+CGMR PS:5.02.203/AL:6.04.204-GM862 QUAD
The module that I purchased from SemiConductorStore has this firmware:
AT+CGMR 07.03.600
July 30, 2009 at 7:33 pm |
Shahram
im also working with a gm862 and it seems as though some of my modules get reset and disconnected from the ATT/Jasper Wireless network
after a couple of days ( i have a feeling its due to the large cap thats required on the output of the 3.8 LDO regulator) you mentioned that you placed a 100mF capacitor low esr and purchased it from DK, however i could not find a 100mF tant cap from DK, did you mean 100uF low esr 600m0hm instead?
————————————-
Well I read this point about a low ESR capacitor in the Telit’s hardware guide and didn’t think much about it. I used a 100μF capacitor, but it was not tantalum nor was it low ESR, and guess what it didn’t work. First I thought that it was my battery, a 19AH 3.6V Lithium Ion battery from Jameco. But after reading this very informative forum entry, I learned that the capacitor was the problem.
The only adequate capacitor that I had was a 1F (yes a monster 1F) capacitor from Sparkfun. I used this capcitor and after giving a few minutes for the capacitor to charge, the circuit worked and GM862 was able to register with the network.
Well I thought it worked with the 1F capacitor, but the reason was that GM862 was connected via the USB in addition to the battery, and after it registered with the network, I disconnected from the USB and it was able to continue with the operation using the battery. But I’m unable to start GM862 with the battery.
I’ve ordered a low ESR 100 mF Tantalum (with a 600 m Ohm ESR) from digikey – $7 each. I suspect that with this capacitor, I’ll be able to start the module with the battery.
July 31, 2009 at 4:34 am |
Hi, The only way that I could reliably start GM862 modules is to use two super caps (10 F) in series.
July 31, 2009 at 6:09 am
so what would happen to the gm862 when using the 100uf low esr caps? my modules power and status leds turn off and on some modules i hear a buzzing noise during network registration and my whole circuit resets, what kind of antenna are you using? its hard to believe that telit hasnt released any app note regarding this issue.
August 11, 2009 at 11:18 am |
This does not work on the gt863-py modem here is South Africa.
Also the time is always reset to 0 when the power is turned off and back on. So how do I read or set the network time automatically each time the modem is started up?
I used AT#NITZ=1,0, and the rest as original above commands.
Any body got a solution?
August 11, 2009 at 2:54 pm |
I’ve used both of the antennas that Sparkfun.com sells. Both work fine. Without the super-caps the Telit modem would not start or would fail to register. I’ve been able to start it with the rechargeable Lithium Ion (4.2 V) battery from sparkfun. But in our application a rechargeable battery is not going to be acceptable.
To get the Network time you must use the AT+CCLK? command. In US on AT&T Network, I have had to use AT#NITZ=7,0 before hand for the AT+CCLK? to actually return the network time. I suspect that each network could be different in this regard.
August 12, 2009 at 8:40 am |
sharam,
where did you place your super caps, im assuming right on the output of your 3.8 regulator? what about any additional circuitry that you added for these super caps? did you do anything to limit the inrush current, when the modules ?
August 12, 2009 at 8:42 am |
did you do anything to limit the inrush current with supercaps being involved.
August 12, 2009 at 3:21 pm |
Hi rc, put the super-caps in series as close to the Telit modules 3.8 V and GND pins as possible.
August 23, 2009 at 2:02 pm |
Hi Shahram
Sorry wrong place for this comment, but I cant seem to post on another older article. I would love some help with your “Map Player”. Please email so we could corrispnd it you have time.
Thanks Jason
January 19, 2010 at 7:56 pm |
Shahram– great post. I spent a couple of days trying to get SNTP implemented on a UC864-G (Telit’s UMTS 3G module). If the UC864-G had a python interpreter then it would have been no problem at all. After a lot of wasted time I found your post about a handy little AT command by the name of “NITZ”. I would have discovered it eventually but you probably saved me another day or two of wasted time. Problem solved and in one line! Keep up the great work. Your notes have helped me out on many occasions.
January 21, 2010 at 6:26 pm |
I guess I would never have found the way to use the NITZ command without this explaination.
Thank you!
February 8, 2010 at 12:02 pm |
The above solution is working correctly on Telit GT-864-PY. I am using T-Mobile network in Hungary. I have used AT#REBOOT intstead of AT#SHDN.
Thanks 🙂
December 13, 2011 at 1:07 am |
Thanks for the awesome tip!
March 25, 2012 at 10:55 pm |
Thanks! this helped me with my project!
March 26, 2012 at 2:03 am |
Glad to hear that. Good luck with your project.
July 16, 2012 at 5:53 am |
Hi, I am using Ublox Leon-g200 modem(gprs and gsm) and i am not found this AT#NITZ=7,0 command in my manual to sync network time to internal clock. instead i am having AT+CTZU=1 Enable automatic time zone via NITZ
BUT THIS NOT WORKING PLZZ DO HELP ME
July 17, 2012 at 5:26 am |
how to sync network time with RTC in ublox modem?
thanks in advance.