You might have used the internet to send sms before. However it is possible to use your own phone to send sms through your computer. Read this tutorial and find out how you can sent sms through your computer using a mobile phone.
In general, there are two ways to send SMS messages from a computer / PC to a mobile phone:
-
Using AT Commands - Here you need to connect a mobile phone or GSM/GPRS modem to a computer . .
-
Using SMS gateway of a wireless carrier or SMS service provider - Here you send SMS messages using a protocol / interface supported by the SMSC or SMS gateway by connecting the computer to the SMS gateway of a wireless carrier or SMS service provider. An sms gateway basically links two sms centers.Placing an sms gateway between the SMS messaging application and the mobile phone or GSM modem and using simple protocols such as http/https can be used for sending sms messages to applications.
But in this article we would stress upon sending SMS using AT commands only.
Sending SMS Messages from a Computer Using a Mobile Phone or GSM/GPRS Modem
A GSM/GPRS modem is a wireless modem that works with GSM/GPRS wireless networks. A wireless modem is similar to a dial-up modem. The main difference is that a wireless modem transmits data through a wireless network whereas a dial-up modem transmits data through a copper telephone line.
To send SMS messages, first place a valid SIM card from a wireless carrier into a mobile phone or GSM/GPRS modem, which is then connected to a computer. There are several ways to connect a mobile phone or GSM/GPRS modem to a computer. For example, they can be connected through a serial cable, a USB cable, a Bluetooth link or an infrared link.
After connecting a mobile phone or GSM/GPRS modem to a computer, you can control the mobile phone or GSM/GPRS modem by sending instructions to it. The instructions used for controlling the mobile phone or GSM/GPRS modem are called AT commands
The following table lists the AT commands that are related to the writing and sending of SMS messages:
AT command Meaning
+CMGS Send message
+CMSS Send message from storage
+CMGW Write message to memory
+CMGD Delete message
+CMGC Send command
+CMMS More messages to send
We send AT commands to a mobile phone or GSM/GPRS modem by using Microsoft Windows terminal command , ie , HyperTerminal. It can be found at Start -> Programs -> Accessories -> Communications -> HyperTerminal. Or You can go to Control Panel -> Add/Remove Programs -> Windows Setup tab -> Communications list box item -> Details button to install MS HyperTerminal A terminal program's function is like this: It sends the characters you typed to the mobile phone or GSM/GPRS modem. It then displays the response it receives from the mobile phone or GSM/GPRS modem on the screen.
Below shows a simple example that demonstrates how to use AT commands and the HyperTerminal program of Microsoft Windows to send an SMS text message. The lines in bold type are the command lines that should be entered in HyperTerminal. The other lines are responses returned from the GSM / GPRS modem or mobile phone.
AT
OK
AT+CMGF=1
OK
AT+CMGW="+9826727212"
> Hello, I am sending this SMS through my PC.
+CMGW: 1
OK
AT+CMSS=1
+CMSS: 20
OK
Here is a description of what is done in the above example:
- Line 1: "AT" is sent to the GSM / GPRS modem to test the connection. The GSM / GPRS modem sends back the result code "OK" (line 2), which means the connection between the HyperTerminal program and the GSM / GPRS modem works fine.
- Line 3: The AT command +CMGF is used to instruct the GSM / GPRS modem to operate in SMS text mode. The result code "OK" is returned (line 4), which indicates the command line "AT+CMGF=1" has been executed successfully. If the result code "ERROR" is returned, it is likely that the GSM / GPRS modem does not support the SMS text mode. To confirm, type "AT+CMGF=?" in the HyperTerminal program. If the response is "+CMGF: (0,1)" (0=PDU mode and 1=text mode), then SMS text mode is supported. If the response is "+CMGF: (0)", then SMS text mode is not supported.
- Line 5 and 6: The AT command +CMGW is used to write an SMS text message to the message storage of the GSM / GPRS modem. "+9826727212" is the recipient mobile phone number. After typing the recipient mobile phone number, you should press the Enter button of the keyboard. The GSM / GPRS modem will then return a prompt "> " and you can start typing the SMS text message "A simple demo of SMS text messaging.". When finished, press Ctrl+z of the keyboard.
- Line 7: "+CMGW: 1" tells us that the index assigned to the SMS text message is 1. It indicates the location of the SMS text message in the message storage.
- Line 9: The result code "OK" indicates the execution of the AT command +CMGW is successful.
- Line 10: The AT command +CMSS is used to send the SMS text message from the message storage of the GSM / GPRS modem. "1" is the index of the SMS text message obtained from line 7.
- Line 11: "+CMSS: 20" tells us that the reference number assigned to the SMS text message is 20.
- Line 13: The result code "OK" indicates the execution of the AT command +CMSS is successful.
For sending SMS through PC follow the following procedure
- - Connect your mobile to the computer by any one of the above mentioned techniques .
- - Set up the corresponding wireless modem driver. You should find the wireless modem driver in the CD or disk that was provided by the manufacturer. If the manufacturer does not provide such CD or disk with your mobile phone or GSM/GPRS modem, you can go to the manufacturer's web site and see whether the wireless modem driver can be downloaded there. If the wireless modem driver cannot be found on the web site, you can still use Windows' standard modem driver.
- - Run the MS Hyperterminal.
- - Enter your name in the connection description dialogue box that appears on your screen and choose an icon for connection. Click OK.
-
- - In the Connect To dialog box, choose the COM port that your mobile phone or GSM/GPRS modem is connecting to in the Connect using combo box. For example, choose COM1 if your mobile phone or GSM/GPRS modem is connecting to the COM1 port. Then click the OK button.
-
- - The Properties dialog box comes out. Enter the correct port settings for your mobile phone or GSM/GPRS modem. Then click the OK button.
-
- - You will get the main hyperterminal text window. Start typing the AT Commands and send SMS successfully.
However the above way of sending sms through PC has the following disadvantages
-
You have to learn how to use AT commands.
-
You have to learn how to compose the bits and bytes of an SMS message. For example, to specify the character encoding (e.g. 7-bit encoding and 16-bit Unicode encoding) of an SMS message, you need to know which bits in the message header should be modified and what value should be assigned.
-
The SMS transmission speed is low. Only 6-10 SMS messages can be sent per minute (when the "SMS over GSM" mode is used). The determining factor for the SMS sending rate is the wireless network.
Quote this article on your site
Only registered users can write comments. Please login or register.
Powered by AkoComment Tweaked Special Edition v.1.4.6 AkoComment © Copyright 2004 by Arthur Konze - www.mamboportal.com. All right reserved |