Go Down

Topic: Time from received sms (Read 965 times) previous topic - next topic

armin

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

davidgoth

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"

armin

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

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy