How to send and receive SMS using computer and gsm modem

Short Message Service (SMS) or TXT messagingrecipient’s number you want to send your
is a technology that enables users to send andsms tois carriage returnis the text message you
receive text messages via mobile phones. Inwant to sendis the character 0x1A, or pressing
order to send/receive SMS via computers, weCtrl key and Z key together
need a gsm modem to connect to theFor example, to send the message “How are
computer, and a relevant software that canyou?” to the number “12345678”, you
communicate with the gsm modemkey in:
using standard AT commands via serial port. InAT+CMGS=“12345678”
this article, I will show the most basic ATThe 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 messagingThe gsm modem will respond with the following if
is a technology that enables users to send andsuccessful:
receive text messages via mobile phones. Apart+CMGS:
for personal usage, SMS can also be used forOKis the message reference, which is a number
business purpose, such as sendingfrom 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, informingfor each outgoing message.
customers about upcoming events, and even3.      Receive SMS (+CMGR)
more sophisticated tasks like hosting SMS surveyWhen 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 supportsTo read the message, the computer/software
sending/receiving of SMS via computers. Such aneeds to send the command:
solution can be achieved by using a gsm modemAT+CMGR=1
that connect to the computer, and a relevantThe gsm modem will respond with something
software that can communicate with the gsmsimilar 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 commandsHow are you?
via serial port. In this article, I will show the mostOK
basic AT commands required for sending andThe 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 formatcase it is UNREAD), the third portion is the
(+CMGF)sender’s mobile number, the forth portion
There are two message formats supported: textis the base station time-stamp, followed by the
mode and PDU mode. In this article, I shallthe 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 textterminating character.
mode:This article aims to provide an introductory guide
AT+CMGF=1to how to send/receive sms using computer. The
Possible response from the gsm modem: OKAT 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