System Time on TC65i

1,007 views
Skip to first unread message

ejw

unread,
Dec 7, 2009, 9:23:56 AM12/7/09
to Cinterion Java enabled chips support
Hi,

The system time on our tc65 modules all default to 01/01/2002 if you
take the millis and try to create a useful date from them.

At the moment I an using AT+CCLK to the modem to get time.

Does anyone know of a way to either reset system time so I can just
use java calls OR have a work around that does some form of date
manipulation so I can get todays date in millis?

Many thanks

EJ

em

unread,
Dec 7, 2009, 9:27:44 AM12/7/09
to java...@googlegroups.com
I think the best would be to set the time using +CCLK and restart the TC65.
Java time is initialized at startup. Eventually you could send SMS to
your own number, get the time stamp and calculate the delta between
time from the module and to correct one. The third option would be to
use some NTP or DAYTIME service.

Cheers em
> --
>
> You received this message because you are subscribed to the Google Groups "Cinterion Java enabled chips support" group.
> To post to this group, send email to java...@googlegroups.com.
> To unsubscribe from this group, send email to javacint+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/javacint?hl=en.
>
>
>



--
Pozdrawiam
Jacek Macuda

ejw

unread,
Dec 8, 2009, 5:21:22 AM12/8/09
to Cinterion Java enabled chips support
Hi,

Thanks for the reply.

Where I am having the problem is with the actual java commands to set
a system clock. All the date/calendar related commands seem to take
the system time (miilis since epoch) and convert them into day/month/
year and so on. I currently download the time from a timeserver in
order to set CCLK.

It seems as though the calendar functions are the only functions
available, and these convert the java time into a calendar as a
specific moment in time. What I wanted was to set the actual system
time in the modem to the current millis since epoch, from there I can
use the calendar functions etc. to get the correct time.

Each time the TC65 is powered off it resets the system clock to
01/01/2002. So I will need to run a function on power up, set the TC65
system time and then do my conversions to day/date as required within
the program by using calendars.

Best wishes

EJ
>        Jacek Macuda- Hide quoted text -
>
> - Show quoted text -

Ricardo Guilherme Schmidt

unread,
Dec 8, 2009, 10:44:56 AM12/8/09
to java...@googlegroups.com
Hello,

I have no problems with getting time in Java/ATC.
Here is what I use.

First the time in TC65 need to be setted using the AT with:
at+cclk="09/07/13,16:20:39"

Or you can tell to it syncronize with the GSM Op. with the following:

at+cmer=2,0,0,2,0
OK

at^sind=nitz,1
^SIND: nitz,1,"09/07/13,19:20:39",-12,0

When you ask the clock it comes in GMT.

Please, check TC65 ATC documentation about this.

In java, the following code get the time from JVM (that is sync with AT
clock)
private String getRealTime() {
Date d = new Date(System.currentTimeMillis());
return d.toString().substring(3);
}
This time is in GMT.
Please check the J2ME Date class documentation and System class
documentation about this.

Yours,
Ricardo Guilherme Schmidt.

em

unread,
Oct 11, 2012, 11:48:11 AM10/11/12
to java...@googlegroups.com

I think you have to attach to gprs by at+cgatt=1 Or setup autoattach, during attach module can retrive date and time. it' s done only once.

Kind regards
makuda

On Oct 11, 2012 1:34 PM, "Felix Lamana" <felix...@gmail.com> wrote:
Hello,
 
I'm trying to get date and time every time my TC65 reboots automatically, but when I send at^sind=nitz,1
I get: ^SIND: nitz,1,,,
Why I can´t get the time? TC65 doesn´t supported this command? Is for my company (Movistar - Spain)?
 
Thanks
--
 
 

Nikita Kapitonov

unread,
Oct 12, 2012, 6:24:16 AM10/12/12
to java...@googlegroups.com
Hello makuda!

Can you make an example or describe this approach in detail?

I also have tried "at^sind=nitz,1" and made no success in it.

Nikita


2012/10/11 em <mak...@gmail.com>

--
 
 

em

unread,
Oct 17, 2012, 6:07:16 AM10/17/12
to java...@googlegroups.com

I don't have any cinterion module with me :(  I remember that I enabled nitz ^sind and after that at+cgatt=1 and after while urc with time&zone was delivered. It looks that during attach module rexeices such info from the network.

Kind regards
Jacek

--
 
 
Reply all
Reply to author
Forward
0 new messages