How to send SMS using a GPRS Modem in PDU Mode?

April 25, 2010
By Guest

I assume that you are reading this post because you are doing some sort of GPRS Modem project and got stuck, well welcome to my world. I spent days doing research and testing and debugging to figure out all the GPRS Modem Functions.

Let me first introduce my GPRS Modem, i bought it online over ebay.co.uk two pieces for a price of one that i get locally here. I was happy that I saved alot of money but after using it I thought I was doomed. But then I started doing research on it a little more to figure out the following important details.

GPRS modem operates in two modes

1. Text Mode
2. PDU Mode

My GPRS modem doesn’t support the text mode so i am only writing the tutorial for PDU Mode.

PDU stands for Protocol Data Unit
It is the information that is delivered as a unit among peer entities of a network and that may contain control information, address information, or data.

Before we go any further let me tell you that i had a compatibility issue with Windows 7 while trying to send SMS using my GPRS modem, it was an issue of the drivers. I googled it again and again but due to the cheap product i was unable to find any new drivers and i ended up downgrading my laptop from windows 7 to windows XP.

Ok now insert the SIM in your GPRS Modem as shown in the pictures below:

Ok now plug it in your PC or laptop !

STEP 1: Check your GPRS Modem COM Port
1. Go to control panel -> phone and modems -> Modems Tab
2. Note the COM port number on a copy or notepad, in my case it is COM3.

STEP 2: CONNECTING TO YOUR GPRS MODEM
1. Open HyperTerminal, Click Start -> Program Files -> Accessories -> Communications -> HyperTerminal
2. It will ask you Connection Description


3. Select COM3(My COM PORT, yours can be different) in Connect using.

4. After you click ok, another dialog box will appear asking you for settings just set the baud rate to 9600 and click ok.
5. Now if you see the Connected and Timer on bottom left, that means you are connected.

STEP 3: COMMUNICATING WITH GPRS MODEM (AT COMMANDS)
1. Type AT and press ENTER
(Note: it will note show you what you type)
2. Check the response, it will say  “OK”

AT means Attention btw.

3. Use this link to Convert your normal TEXT to PDU, http://smartposition.nl/resources/sms_pdu.html
(Note: Don’t worry, i’ll give you a PDU Encoder and Decoder class my next post that you can use with your C# code for conversion)

4. On that link if you scroll down you will see Online PDU Converter which converts String message to Hexadecimal.
In SMSC type your Message Center number, suppose if you are using TELENOR and you live in Pakistan it would be “923455000010″ or you can just find out by typing the following command
AT+CSCA? and press Enter
You will get a response like this
+CSCA: “+923455000010″,145

OK

where 923455000010 is your message center number.

in reciever type your number and select 8 bit

in the big box type your message e.g “LiveTechPro”

you will get a HexaDecimal string with an AT Command some what like this

AT+CMGW=20
079129435500000111000B923014325476F80004AA06424F5A494D53

5. Copy paste line 1 in Hyperterminal and you will get:

>

which means enter the PDU String

Now copy paste your line 2
079129435500000111000B923014325476F80004AA06424F5A494D53

and press Ctrl + Z

you will get

+CMGW: 14

OK

Which means your SMS number is 14 and it has been sent.

Check your mobile phone for your SMS and wait for my next post to see how i did this stuff through my C# code.

Have you join us on facebook yet & twitter ? Do it now !!

Related Posts with Thumbnails
More in How To, Microsoft, Nokia, Windows XP (57 of 144 articles)