Synchronizing clock of Nokia S40 mobile phone with a current date time on PC?

626 views Asked by At

Not sure where else I could have asked this question, so here it goes.

I have been using wammu/gammu on my Ubuntu PC to connect to a Sony Ericsson T630 mobile via Bluetooth - all works fine there. In particular, there is a feature that I like in wammu, called "Synchronize time": instead of setting the current time and date manually in the phone, that feature will automatically sync the clock of the mobile to the clock of the PC.

Recently I got a Nokia 112, which apparently runs the S40 operating system. And every time I power it down and take out the battery, it asks me to set the current date/time manually again, which I find extremely irritating.

So, I managed to connect to the Nokia 112 phone from wammu, and issue "Synchronize time" command - unfortunately, it failed; the logs report something like:

Tue 2014/06/03 13:16:17: Entering GSM_SetDateTime
Tue 2014/06/03 13:16:17: Setting date & time
Tue 2014/06/03 13:16:17: SENDING frametype 0x00/length 0x1F/31
Tue 2014/06/03 13:16:17: 41A|54T|2B+|43C|43C|4CL|4BK|3D=|22"|311|344|2F/|300|366|2F/|300 AT+CCLK="14/06/0
Tue 2014/06/03 13:16:17: 333|2C,|311|333|3A:|311|366|3A:|311|377|2B+|300|300|22"|0D      3,13:16:17+00". 
Tue 2014/06/03 13:16:17: 1 "AT+CCLK="14/06/03,13:16:17+00""
Tue 2014/06/03 13:16:17: 2 "ERROR"
Tue 2014/06/03 13:16:17: RECEIVED frametype 0x00/length 0x28/40
Tue 2014/06/03 13:16:17: 41A|54T|2B+|43C|43C|4CL|4BK|3D=|22"|311|344|2F/|300|366|2F/|300 AT+CCLK="14/06/0
Tue 2014/06/03 13:16:17: 333|2C,|311|333|3A:|311|366|3A:|311|377|2B+|300|300|22"|0D |0D  3,13:16:17+00"..
Tue 2014/06/03 13:16:17: 0A |45E|52R|52R|4FO|52R|0D |0A                                  .ERROR..        
Tue 2014/06/03 13:16:17: GSM_SetDateTime failed with error NOTSUPPORTED[21]: Function not supported by phone.
Tue 2014/06/03 13:16:17: Leaving GSM_SetDateTime
Tue 2014/06/03 13:16:34: Entering GSM_GetSignalQuality
Tue 2014/06/03 13:16:34: Getting signal quality info
Tue 2014/06/03 13:16:34: SENDING frametype 0x00/length 0x07/7
Tue 2014/06/03 13:16:34: 41A|54T|2B+|43C|53S|51Q|0D                                      AT+CSQ.         
Tue 2014/06/03 13:16:34: 1 "AT+CSQ"
Tue 2014/06/03 13:16:34: 2 "+CSQ: 93,99"
Tue 2014/06/03 13:16:34: 3 "OK"
Tue 2014/06/03 13:16:34: RECEIVED frametype 0x00/length 0x1C/28
Tue 2014/06/03 13:16:34: 41A|54T|2B+|43C|53S|51Q|0D |0D |0A |2B+|43C|53S|51Q|3A:|20 |399 AT+CSQ...+CSQ: 9
Tue 2014/06/03 13:16:34: 333|2C,|399|399|0D |0A |0D |0A |4FO|4BK|0D |0A                  3,99....OK..    
Tue 2014/06/03 13:16:34: Signal quality info received
Tue 2014/06/03 13:16:34: Parsing +CSQ: 93,99 with +CSQ: @i, @i
Tue 2014/06/03 13:16:34: Parsed int 93
Tue 2014/06/03 13:16:34: Parsed int 99
Tue 2014/06/03 13:16:34: Leaving GSM_GetSignalQuality

So, apparently this phone can communicate via AT commands over Bluetooth; it's just that, apparently, it doesn't support the AT+CCLK command which wammu uses to synchronize time. I've also found:

... which seem to confirm that AT+CCLK is not supported by Nokia phones (at least not S40 ones).

Now, what motivated me to post, is this that I read in the wammu log:

Tue 2014/06/03 13:14:47: 1 "AT+CGMI"
Tue 2014/06/03 13:14:47: 2 "Nokia"
Tue 2014/06/03 13:14:47: 3 "OK"
Tue 2014/06/03 13:14:47: RECEIVED frametype 0x00/length 0x17/23
Tue 2014/06/03 13:14:47: 41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |4EN|6Fo|6Bk|69i|61a|0D  AT+CGMI...Nokia.
Tue 2014/06/03 13:14:47: 0A |0D |0A |4FO|4BK|0D |0A                                      ...OK..         
Tue 2014/06/03 13:14:47: Manufacturer info received
Tue 2014/06/03 13:14:47: HINT: Consider using Nokia specific protocol instead of generic AT.
Tue 2014/06/03 13:14:47: [Manufacturer: Nokia]
Tue 2014/06/03 13:14:47: Leaving GSM_GetManufacturer

Now, this Nokia 112 actually supports SyncML, and I already managed to use syncevolution to synchronize address book contacts between the Nokia 112 and the PC (over Bluetooth). Unfortunately, it seems syncevolution is only good for contacts, calendar items and notes/todos (e.g. it doesn't backup SMS messages, apparently) - and I also couldn't find any reference if it supports synchronizing the mobile clock with the PC time.

So, my question ultimately is: if AT+CCLK is not supported by these phones, is there any other way - maybe SyncML? or something else (maybe OBEX) - that would allow me to synchronize the clock of the mobile with the current time on a Linux PC, over a Bluetooth connection?

1

There are 1 answers

0
sdaau On

Well, not exactly an answer to this, but just I thought I'd post:

Turns out, on this phone, there is a setting, that can be reached by:

Menu / Settings / Date and time / (scroll down, and there is) Auto-update of date & time

Lets you select if the time in your device is automatically updated to local time by the network. The functionality may vary depending on the network.

There are three options there, On, Confirm first, and Off - by default it is set to Off. I changed that to Confirm first, turned off the phone power, turned it back on again; at boot it asked me something like "Update current time?", I clicked yes, and so the time/clock got updated automatically.

But I'd still prefer, if I could synchronize time from the computer -- so the question is still open...