| Short Message Service (SMS) or TXT messaging | | | | recipient’s number you want to send your |
| is a technology that enables users to send and | | | | sms tois carriage returnis the text message you |
| receive text messages via mobile phones. In | | | | want to sendis the character 0x1A, or pressing |
| order to send/receive SMS via computers, we | | | | Ctrl key and Z key together |
| need a gsm modem to connect to the | | | | For example, to send the message How are |
| computer, and a relevant software that can | | | | you? to the number 12345678, you |
| communicate with the gsm modem | | | | key in: |
| using standard AT commands via serial port. In | | | | AT+CMGS=12345678 |
| this article, I will show the most basic AT | | | | The gsm modem will response with the character |
| commands required for sending and receiving of | | | | >. Then you key in your text: |
| SMS in text mode. | | | | >How are you? |
| Short Message Service (SMS) or TXT messaging | | | | The gsm modem will respond with the following if |
| is a technology that enables users to send and | | | | successful: |
| receive text messages via mobile phones. Apart | | | | +CMGS: |
| for personal usage, SMS can also be used for | | | | OKis the message reference, which is a number |
| business purpose, such as sending | | | | from 0 to 255 returned by the gsm modem. This |
| products’ promotions to customers, | | | | number begins with 0 and is incremented by one |
| receiving customers’ feedback, informing | | | | for each outgoing message. |
| customers about upcoming events, and even | | | | 3. Receive SMS (+CMGR) |
| more sophisticated tasks like hosting SMS survey | | | | When a new sms arrived, the gsm modem would |
| or contest. | | | | send the following byte stream: |
| In order to perform these business operations, | | | | AT+CMTI: SM,1 |
| there is a need to have a solution that supports | | | | To read the message, the computer/software |
| sending/receiving of SMS via computers. Such a | | | | needs to send the command: |
| solution can be achieved by using a gsm modem | | | | AT+CMGR=1 |
| that connect to the computer, and a relevant | | | | The gsm modem will respond with something |
| software that can communicate with the gsm | | | | similar to the following: |
| modem. | | | | +CMGR: REC UNREAD,12345678, |
| To communicate with the gsm modem, one | | | | 08/10/01 18:20:35+00, |
| would need to transmit standard AT commands | | | | How are you? |
| via serial port. In this article, I will show the most | | | | OK |
| basic AT commands required for sending and | | | | The first part is the command +CMGR, the |
| receiving of SMS in text mode. | | | | second part is the status of the message (in this |
| 1. Set preferred message format | | | | case it is UNREAD), the third portion is the |
| (+CMGF) | | | | sender’s mobile number, the forth portion |
| There are two message formats supported: text | | | | is the base station time-stamp, followed by the |
| mode and PDU mode. In this article, I shall | | | | the carriage return and line feed characters, the |
| illustrate the easier text mode. | | | | message content, and finally the OK |
| To set the preferred message format as text | | | | terminating character. |
| mode: | | | | This article aims to provide an introductory guide |
| AT+CMGF=1 | | | | to how to send/receive sms using computer. The |
| Possible response from the gsm modem: OK | | | | AT commands and packing of PDU mode are |
| 2. Send SMS (+CMGS) | | | | much more complex and will not be discussed in |
| To send an SMS in text mode: | | | | this article. |
| AT+CMGS=whereis destination address, the | | | | |