Now a days SMS is major interactive thing in major mobile application development platform like Android, IOS, Blackberry, Symbain & Bada etc. Developers are re-imagine the way of SMS used previously. So intelligent auto sender SMS apps like ebuddy XSMS, Nimbuzz makes peoples life easier. Now a days SMS is nothing but day to day notification service. If you are a developer then here is a good chance to explore your idea using sms.For this you don’t require to BUY SMS gateways and all.You can use your mobile as middleware to avail free SMS sending service. All actions will be taken from your cell phone & you will charge only according to your carrier SMS rates

Requirements-
1) Multimedia mobile with its drivers installed on your computer,you must connect it through USB mode.
2) rstxSerial.dll file (please copy this dll to your ‘C:WindowsSystem32’ folder)
3) RXTXcomm.jar file
4) IDE- Netbeans or Easy Eclipse
We are all known Netbeans and Eclipse IDE’s but Easy Eclipse for GUI purpose.
Please download required jar and dll files from following link:
Download SMS Sending JAR & DLL files
AT commands-
- AT commands are instructions used to control a modem. AT is the abbreviation of ATtention. AT commands are also known as Hayes AT commands. There are different views to understand the meanings of “AT”. Some call it “Attention Telephone”, whereas others interpret it as “Attention Terminal” commands.
- For execution purpose we need hyperterminal. For this run command “hypertrm.exe” .
- If you are running this command first time you will get the following window -
- Just fill first two options, click OK, after that you will get this window-
- If you are using Windows 7, copy these 3 files from Windows XP:-
1. C: Program Files/Windows NT/hypertrm.exe
2. C: WINODWS/system32/hypertrm.dll
3. C: WINODWS/Help/hypertrm.chm
Create folder “HyperTerminal” in C:/Program Files and paste above files in this folder. Double click on hypertrm.exe and you will get HyperTerminal in Windows 7.
Connection description Window-
- Type any name you want and click OK.
- Then see the option of “Connect using”, chose COM port on your mobile device gets connected.
- (For that Go to Control Panel -> Phone and Modem Options. Then click the Modems tab. In the list box, you can see which COM port the mobile phone is connected to.)
- Choose it and click OK.
- You will get following windows, select “Bits per second option as 9600”. Click OK.
COM port properties-
Type following commands one by one-
- AT (hit enter).
(if you don’t see anything on the window, then go to File->Properties->Settings->ASCII Setup->Select check box of “Echo typed characters locally”->Click OK->Click OK.)
- You will get a response as OK.
- AT+CMGF=1 (hit enter).
- AT+CMGS=”**********” ( Replace * by 10 digit mobile number to which you want to send message).
- You will get greater than symbol like this “ > “
- Type your message and press ctrl+z key , hit enter after this.
- The message will be sent.
Download Java Source Code Project from following link
1. Send SMS using Java Source Code
2. For that check following window
On Hyperterminal command execution
Please close this window after using commands, because when this instance is present, we can not use it for another purpose.
Snapshots of Application To Send SMS -
(In Eclipse) :-
How to import existing project into eclipse-
- Extract project zip file which you downloaded.
- On eclipse, click File->Import->General->Existing project into workspace->Browse option for Select root directory-> (Suppose you extract file on the Desktop then Desktop will be the root directory , also choose ” Copy projects into workspace”)->click Finish.
- After that you have to change the COM port number in “GUIToSendMessage.java ” file on line number 87. I have written there “COM15”. You have to change it according to your settings.
- Run GUIToSendMessage. java file. You will see above window. Type mobile number and enter a message and click on the Send button. The message will be sent.
How to import existing project into Netbeans-
- Extract project zip file which you downloaded.
- On Netbeans, click File->Import Project->Eclipse Project->Chose option of “ Import Project Ignoring Project Dependencies ”->Browse for “Project To Import”->(here you import your project)->Browse for “Destination Folder”->(It must be your Netbeans default workspace where you store all your Netbeans projects)->Click “Finish”.
- After that you have to change the COM port number in “GUIToSendMessage.java ” file on line number 87. I have written there “COM15”. You have to change it according to your settings.
- Run GUIToSendMessage. java file. You will see above window. Type mobile number and enter a message and click on the Send button. The message will be sent.
If you are facing any problem with this code then let us know our team will help you to fix your problems ! if you develop any cool application using this code then do share with us our readers appreciate your development !








Thanks nice post.I am not a good programmer , didn’t understand clearly , let me give some more setails
Sibin recently posted..How to check whether the sites you visit daily contains virus/malwares
Hi to understand it clearly kindly refer attached files !
hi
first of all i would say that you described it in very easey language and paragraph by paragraph with diagram.
i will use this code after completed java. i am persuing java
thanks
Sure let me know about it
I did all the setup but i was get a following Error:-
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread “AWT-EventQueue-0″ java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
where is the exactly problem.?
Thanks in advance.
Hi bhushan,
Look like some liblary files are missing in ur SDk kindly download and include it into ur project check this http://goo.gl/8RuvP & this too http://goo.gl/IA1oY. I already tested my code and its working fine .Let me know if any help needed
Yup, It is working fine.
when i run this code it gives me error like unsuppported major.minor version 51. can you tell me why this problem occur and what i have to do for this ?
Hi try to install BOTH jre / jdk of same version. i.e JRE 1.7/ JRE 1.7
Can you include file rxtxSerial.dll in your System32 folder. Please check that and give reply.
I did all set up properly. I solve all the issues also. I get an sms also. But now I was facing a small problem. SMS is come Like this,
mare tATZ
AT+CREG?
AT+CMGF=1AT+CMGS=”mobile number”
Message
Now the problem is that , I can not able to send only a message. AT commands also send along with that Message. And sometimes, It is not giving FULL sms. It is escaping some part of the SMS. What should I do?
Thanks in advance….
You did a great job.
Please reply if you know.
hi,
Actually you post is very nice and helpfull..
i am doing my project thst to send the sms from PC connected with mobile/gsm modem to another mobile….but when i run your code the messege not sending the output is..
actionPerformed()
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
gnu.io.CommPortIdentifier@f3d6a5
COM1: PORT_OWNED
what will i do.can you help me
Hi Sruthi, can u please tell us which OS ur using,I mean 32-bit or 64-bit? Win xp or win7? A terminal issue may occur if you are using different lib. Your inputs will help us to solve your query
I also use OS win 64 bits. I have the same result as @sruthi
Its depend on you how you will code it
HI ..
Program is very good and running well..But , is there a way to send multiple recepients or a kind of a loop ..??
Thanks..
Nope bro, You have to code it accordingly or you have to purchase SMS gateway. Above java sms sending code only work for single sms service