Pages: [1]   Go Down
Author Topic: Time from received sms  (Read 624 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it possible to extract the current time from a received SMS? I have a project where I need to get the time using only GSM (no data GPRS).

I have created a command to get the realtime clock of the module and I receive the time but it is not set to a local time (1/1/8 00:00 or something). So I would like to update the time automatically when I receive a SMS message.

Is there a timestamp available when I receive a SMS message?

Thanks
Logged

Madrid (Spain)
Offline Offline
Full Member
***
Karma: 0
Posts: 103
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In GSM library, this option is not possible, but you can do it with AT commands.

The command AT+CMGL="ALL" shows all SMS messages allowed in the modem. With each SMS, shows timestamp from service center.

Example:
AT+CMGL="ALL"

+CMGL: 1,"REC UNREAD","5277","","2013/06/19 00:13:56-28"
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks this worked.

I made a new function in GSM3ShieldV1SMSProvider which extracts the time from a received message. I just used the same method as in remoteSMSNumber.

Thanks
Logged

Pages: [1]   Go Up
Jump to: