In this tutorial I shall demonstrate the usage of  GSM board to send SMS.

GSMGSM2

Materials required for this workshop are :

Hardware:

1.GSM Module Board with an active SIM card.

2.12V DC 1A adapter for GSM power supply.

3.USB – UART converter with RS232 straight cable and USB cable.

Software:

1.Serial Communication software PuTTY . Download it from

http://putty.en.softonic.com/

or you can use the inbuilt Hyper Terminal software in case your PC’s OS is XP.It is located in Programs>Accessories>Communication.

While using Hyper terminal remember the following settings:

Under File –> Properties –> Settings    click ASCII setup and check mark “Echo typed characters locally”.Otherwise you can’t see what you type.

Another software is  “Terminal” from    http://realterm.sourceforge.net/  .Terminal  is a simple serial port terminal emulation program.

I prefer to use PuTTY as it is trouble free standalone program and response is faster than others.

To start with insert the SIM card into the holder at the back of the board.

Connect the 12v DC supply to the board.Connect the board to your PC’s serial port using a RS232 cable.In case you use the USB port , then a USB – UART board is required.

USB1  USB to UART board

As soon as you connect the DC power to the board ,the green Power LED glows and then the red Signal LED flashes intermittently.Now make a call to the SIM number inserted in the board.You can hear  the ring back tone in the caller phone  and the Ring green LED flashes according to the Ring.Now your GSM board is ready to communicate.

Now open the Control panel –>Device Manager of your PC   and expand the Ports(COM&LPT) to verify the port connection.If you are using a RS232 cable directly to PC ,it will be COM1. Else it will be different (in our case it is COM6).

DMANAGER

Double click the downloaded PuTTY .

Enter COM6  under serial line and baud rate 9600 under Speed.

Select connection type as Serial. Provide a name and save the session.

putty31

Now select the saved session and click Open to fire up the TERMINAL.

For the terminal to communicate with the GSM board  AT commands are used.

AT is abbreviation of ATtention.There are Basic and Extended AT commands.Basic AT commands do not start with a “ + “  like ATD, ATA,ATH,…

Extended AT commands start with  “ + “. All GSM AT commands are extended commands. e.g  AT+CMGS ,  AT+CMGR , AT+CMGF ,…

To start with type  AT  (uppercase preferred) and hit Enter.

GSM board will respond with OK.

Type AT+CPIN?  and hit enter to know whether SIM is inserted.

To dial a number type  ATD9001234567;

ATD followed by the mobile number & then a SEMICOLON .Hit enter to make a Call.To disconnect type ATH.

To send SMS type AT+CMGF=1

Modem confirms with OK that it changes to Text mode.

Then type  AT+CMGS=”mobile.no”

After the > symbol type your message and press ctrl+z  to send the SMS.

at

For a more detailed tutorial of SMS and AT commands visit

http://www.developershome.com/sms

Following are some of the most frequently used AT commands :

AT+CGMI                            To get the manufacturer’s ID

AT+CMGF=1                        Switch to text mode before sending SMS

AT+CMGS=”mobile.no”       Send SMS after typing the message & pressing ctrl+z

ATD999xxx1234;                  Dial to the mobile number provided

ATH                                         Disconnect the call

AT+CMSS                               Send SMS from storage

AT+CMGR                              Read one SMS at a time

AT+CMGD=1                         Delete a Message.

AT+CMGL=”ALL”                 Read all SMS messages in the storage area

AT+CMGL                              List SMS messages

AT+CSCA?                             To know the service center address of  GSM provider

To send SMS to multiple numbers you have to write message to memory and then use CMSS command many times. Here is the procedure:

AT+CMGF=1                                           — enable Text mode

OK

AT+CMGW=”9443312345”                       —CMGW writes message to Memory

>Test Message<ctrl+z>

GSM responds as +CMGW:3  OK  where 3 is the index number specifying the location of SMS message.

AT+CMSS=3,”NEXT_MOBILE_NO.”     –  use CMSS to send message from Storage.

AT+CMSS=3,”New_Mobile_no.”

Like this you can use the index number of message and send it to multiple phones.

Watch this video of GSM Board demo,usage of Putty as Terminal and AT command usage to communicate with GSM :

GSM Tutorial from Saravana Electronics