admin September 7, 2021

How to send and receive SMS using computer and gsm modem

Short Message Service (SMS) or TXT messaging is a technology that enables users to send and receive text messages via mobile phones. Apart for personal usage, SMS can also be used for business purpose, such as sending products’ promotions to customers, receiving customers’ feedback, informing customers about upcoming events, and even more sophisticated tasks like hosting SMS survey or contest.

In order to perform these business operations, there is a need to have a solution that supports sending/receiving of SMS via computers. Such a solution can be achieved by using a gsm modem that connect to the computer, and a relevant software that can communicate with the gsm modem.

To communicate with the gsm modem, one would need to transmit standard AT commands via serial port. In this article, I will show the most basic AT commands required for sending and receiving of SMS in text mode.

1.      Set preferred message format (+CMGF)

There are two message formats supported: text mode and PDU mode. In this article, I shall illustrate the easier text mode.

To set the preferred message format as text mode:

AT+CMGF=1

Possible response from the gsm modem: OK

2.      Send SMS (+CMGS)

To send an SMS in text mode:

AT+CMGS=

where

is destination address, the recipient’s number you want to send your sms to

is carriage return

is the text message you want to send

is the character 0x1A, or pressing Ctrl key and Z key together

For example, to send the message “How are you?” to the number “12345678”, you key in:

AT+CMGS=“12345678”

The gsm modem will response with the character “>”. Then you key in your text:

>How are you?

The gsm modem will respond with the following if successful:

+CMGS:

OK

is the message reference, which is a number from 0 to 255 returned by the gsm modem. This number begins with 0 and is incremented by one for each outgoing message.

 

3.      Receive SMS (+CMGR)

When a new sms arrived, the gsm modem would send the following byte stream:

AT+CMTI: “SM”,1

To read the message, the computer/software needs to send the command:

AT+CMGR=1

The gsm modem will respond with something similar to the following:

+CMGR: “REC UNREAD”,“12345678”, “08/10/01 18:20:35+00”,

How are you?

OK

The first part is the command +CMGR, the second part is the status of the message (in this case it is UNREAD), the third portion is the sender’s mobile number, the forth portion is the base station time-stamp, followed by the the carriage return and line feed characters, the message contentComputer Technology Articles, and finally the “OK” terminating character.

This article aims to provide an introductory guide to how to send/receive sms using computer. The AT commands and packing of PDU mode are much more complex and will not be discussed in this article.

Meet SMS-iT™. The Cheapest Bulk Text Message Marketing Platform on the internet powered by A.I., a Decentralized Gateway, and a Database of 1billion+ segmented mobile #’s of potential customers, that can be used in building TCPA compliant consent lists for mobile marketing campaigns.

SMS-iT™ allows you to intelligently search mobile records, build TCPA compliant consent lists for mobile marketing campaigns, target potential customers and more with A.I. & Automation.

* Send SMS/MMS/Voice messages across the world at the cheapest rate online
* Drive more sales with highly targeted promotions
* Provide better customer service with 2-way messaging
* Keep customers engaged with automated texts
* Save time and integrate with your existing marketing software
* Learn more about customers with Data Collection
* Gather useful feedbacks with polls and surveys
* Much, much more!

Over 1 000 000 000 segmented records to target: Target your potential customers using their exact Geographic locations, and other segmented characteristics, like profile data, demographics, interests, industry, behavior, location, etc. Communicate without limits!

Get Started For FREE Now – REGISTER and Receive 100 FREE SMS/MMS/Voice Credits Today!.

Leave a Reply