CCLK? AT command not working

Hi All,

For my project I am using SIM800A with Atmega644 controller.

My primary function is to read Time from GSM module and update my local RTC.
For that I am using AT+CCLK? But I am getting

There are two cases:

  1. When I use BSNL SIM I get wrong time,( Time reset all the time when I reset module)

  1. but when I use other service provider like Airtel I get accurate time for same command.

What will be the problem? Any commands I am missing here?

This value is highly network dependent. I don’t prefer to use this.
You can get information from a time server and update your time.

Thank you @RaviPujar for your suggestion, Can you Please elaborate how can I get information from time server? I do not use GPRS.

You have to use GPRS to get data from time server using TCP. Just connect to Time server IP and you get time string back.

what you did is “READ TIME” -> AT+CCLK?
but 1st you need to enter the valid time 1st time(AT+CCLK=)
where time format is : “yy/MM/dd,hh:mm:ss±zz”
example : 10/05/06,00:01:52+08" note that +08 = GMT+2 as it works as quarters
then the RTC will use it to have valid time all time
so as long as your VRTC battery is working you can make AT+CCLK? and get valid time

Thank you @Mostafa_AliaEl-Din, I need to read time without feeding it first time. And I observed and I did may projects using airtel but usually I am not feeding anytime first time. Why other provider like Airtel Docomo gives accurate time even I dont feed any time first time?

IDK that’s weird I was using sim card from vodafone Egypt and it never affected the time in the sim808 RTC , maybe that airtel thing has something special that do automatic feed to the communication module , like once it gets the time it does the at command of writing auto . not sure tbh .

1 Like

check the “AT+CCLK” part in the data sheet
the default is entering the time once then read it whenever u want as long as you have battery connected to the VRTC

1 Like

@RaviPujar Do you have any tutorial or link for getting server time?

I am making tutorial to get network time. Server time is just you connect to that IP and you will get string back in TCP mode. Will make tutorial on it also.

1 Like

As said in SIM 900 application note I followed following steps at one step i am getting error.

What I tried is in below screenshot


Since I am using BSNL SIM I am using APN ‘bsnlnet’.

Why the ERROR? Is there any other methods ?

Can you just use network time sync, It will be simpler.

Thank you for your tutorial, But did you check the same steps with BSNL SIM? As I said earlier it is working with Airtel, and you tested with Vodafone. but I followed your tutorial using BSNL SIM it is not working.

Please check with BSNL and let me know whether you are getting Network time and is there any other method to get time other than connecting to GPRS. If no other ways I will do it with connecting to GPRS. If I use GPRS as you said in tutorial it is not reliable, data waste.
(I should use only BSNL SIM as there is no other services available at the location, as it is forest area).

Thank you.