Getting Time And Date from GSM Modem.

We can configure the GSM Modem to keep time. So there is no need for a separate RTC to keep time. These AT commands are supported  by the SIMCOM SIM900 and SIM800 series.

So the first step is to connect the modem to the computer. Then open a terminal using GtkTerm or PUTTY.

Send the following AT command.

AT+CLTS?

screenshot-from-2016-12-28-15-57-52

So if not configured the MODEM will reply +CLTS: 0. If the value returned is 0 it means network time updating is disabled.

Getting Time And Date from GSM Modem.

So let us make that value 1. Then we should write it permanently to the modem. &W is used to write the state permanently to Modem. So even if the modem is restarted CLTS will be enabled.

Send the following AT command

AT+CLTS=1;&W

Getting Time And Date from GSM Modem.

Now restart the modem using Software Restart command AT+CFUN=1,1 or you can hardware restart it.

AT+CFUN=1,1

Getting Time And Date from GSM Modem.

Now you can see after Call Ready there is a new line *PSUTTZ: which won’t be there during normal startup. It shows the date and UTC time. Year – 2016. Month – 12. Date – 28. Hour – 10. Minute – 30. Second – 7. +22 indicates the time zone expressed in quarters of an hour, between the local time and UTC; range -47 to +48. Here in India the IST is UTC + 5:30. In 5 hours and 30 minutes there are 22 quarters of an hour.

You can confirm whether the modem is in CLTS mode by sending AT+CLTS?

AT+CLTS?

Getting Time And Date from GSM Modem.

If the modem responds with 1, then CLTS mode is activated.

And finally to get the current time send AT+CCLK?

AT+CCLK?

Getting Time And Date from GSM Modem.

Modem will return the current local time in “yy/mm/dd,hh:mm:ss+/-zz” format.

If the GSM Modem is connected to an embedded board like arduino then you must send these AT commands via UART.

You can buy it from our store here.

Leave comment if  you found this helpful.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s