25.3. Format of the Information Response of the +CMGS AT Command in SMS Text Mode

If the GSM/GPRS modem or mobile phone sends the SMS message successfully, it will return an information response to the computer / PC. In SMS text mode, the information response of the +CMGS AT command has the following format: (Optional fields are enclosed in square brackets.)


+CMGS: message_reference[,service_center_time_stamp]


Here is an example that gives you some idea of how an actual information response should look like:


+CMGS: 5,"07/02/05,08:30:45+32"


The message_reference Field

The first field of the information response of the +CMGS AT command, message_reference, contains an integer in the range from 0 to 255. It is a reference number allocated by the GSM/GPRS modem or mobile phone to the SMS message sent.


The service_center_time_stamp Field

The second field of the information response of the +CMGS AT command, service_center_time_stamp, contains a string that tells the time and date at which the SMS message arrived at the service center (i.e. SMSC). The time stamp format is "yy/MM/dd,hh:mm:ss±zz". (yy = year, MM = month, dd = day, hh = hour, mm = minute, ss = second, zz = time zone. Note: the unit of time zone is a quarter of an hour.)

For example, "07/02/05,08:30:45+32" represents 5 February 2007, 8:30:45 GMT+8 hours. "+32" means GMT+8 hours, since 32 quarters of an hour = 8 hours.

Note that service_center_time_stamp is an optional field. A GSM/GPRS modem or mobile phone includes this field in the information response only if the messaging service value set by the AT command +CSMS (command name in text: Select Message Service) is 1 and the mobile network supports the use of this messaging service value. By default the messaging service value is 0. Usually this is the value to be used and the service_center_time_stamp field is not shown.


Previous Page Page 46 of 65 Next Page

Contents at a Glance (Click Here for Full Table of Contents)

Feedback Form (ExpandCollapse)

What do you think about this web page?






(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.

A button for going back to the top of this page