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 |
- 1. Introduction to SMS Messaging
- 2. What Makes SMS Messaging So Successful Worldwide?
- 3. Example Applications of SMS Messaging
- 4. What is an SMS Center / SMSC?
- 5. Basic Concepts of SMS Technology
- 6. Intra-operator SMS Messages
- 7. Inter-operator SMS Messages
- 8. International SMS Messages
- 9. What is an SMS Gateway?
- 10. How to Send SMS Messages from a Computer / PC?
- 11. How to Receive SMS Messages Using a Computer / PC?
- 12. Introduction to GSM / GPRS Wireless Modems
- 13. How to Use Microsoft HyperTerminal to Send AT Commands to a Mobile Phone or GSM/GPRS Modem?
- 14. Introduction to AT Commands
- 15. General Syntax of Extended AT Commands
- 16. Result Codes of AT Commands
- 17. AT Command Operations: Test, Set, Read and Execution
- 18. Testing the Communication between the PC and GSM/GPRS Modem or Mobile Phone
- 19. Checking if the GSM/GPRS Modem or Mobile Phone Supports the Use of AT Commands to Send, Receive and Read SMS Messages
- 20. Operating Mode: SMS Text Mode and SMS PDU Mode
- 21. Setting or Reading the Service Center Address / SMSC Address (AT+CSCA)
- 22. Preferred Message Storage (AT+CPMS)
- 23. Writing SMS Messages to Memory / Message Storage (AT+CMGW)
- 24. Deleting SMS Messages from Message Storage (AT+CMGD)
- 25. Sending SMS Messages from a Computer / PC Using AT Commands (AT+CMGS, AT+CMSS)
- 26. Reading SMS Messages from a Message Storage Area Using AT Commands (AT+CMGR, AT+CMGL)
- 27. Appendix A: How to Choose an SMS Service Provider (SMS Gateway Provider, SMS Reseller, SMS Broker)?
- 28. Appendix B: Comparison Table of SMS Service Providers (SMS Gateway Providers, SMS Resellers, SMS Brokers)
- 29. Appendix C: Free Software/Tools and Libraries for Sending and Receiving SMS Messages with a Computer / PC
- 30. Appendix D: GSM 7-bit Default Alphabet Table (with Character Codes of ISO 8859 Latin 1)