Hi friends…I have been into this SMS gate way stuff some 6 months back.My requirement was to send and receive sms using a mobile phone connected to my computer via bluetooth using a C#.net application.When i googled for it i got to know that there are many SMS gateway softwares available and obviosuly none of them are free…I used many sms gateways like OZEKI ,Mcore etc. …But the problem is all of them are paid softwares and so it does have limitations. So i tried making an sms gateway of my own and by gods grace i succeded.
I used Serial port communication using c#.net and AT commands for communicating with the modem. ..Its working perfectly for me.I can send and receive sms using this … You can download ,distribute and modify this code to meet your requirements. If u prefer using OZeki(SMS Gateway software) ,here is the tutorial for using those kind of stuffs
http://www.shefeekj.com/send-sms-fro…ql-server.html
Ă‚Â
Before reading this tutorial,you may consider reading my previous articles
At-commands and serial port communication
Ă‚Â
I will sum up the method which i have implemented
Send SMS
1.Take message from User
2.Convert it to PDU format
3.Connect the mobile using the serial port.
4.Send the message in Pdu format to the mobile using AT Commands(Read previous article about AT COmmands)
Receive SMS
1.Connect the mobile using the serial port.
2.Read SMS from mobile using AT COmmands(Read previous article about AT COmmands)
3.Extract the message from PDU format
The process of reading sms from mobile do have limitations.Nokia phones normally does not allow to read its phone memory due to security reasons.So it workks only with Sony Erricson handsets.
Okiee..lets move on to the source code..It contains mainly 3 classes
1.SMSCOMMS.cs
This class is responsible for sending and receiving sms.Separate functions are written inside this class to send,receive and to estab ish connection before sending.
2.SendSms.cs
This class converts the message in text format to pdu format which can be recognised by mobiles.If you want to know what exactly is pdu format,you may consider reading my previous article
3.ReceiveSms.cs
This class extracts message from PDU format into human readable text format.
How to use this class?
Hope you know the port in which you connected your mobile.Please change the port specified in the class SMSCOMMS.cs
You can invoke these classes in the following format
SendSMS obj = new SendSMS();
obj.SendSms(“MessageBody”,”919995724121″);
You can Receive SMS in the following format
ReceiveSMS obj = new ReceiveSMS();
obj.Receive();
The reccieved message will be avalable in the array messageDetails[]
messageDetails[0] = Message Centre Number
messageDetails[1] = Sender Number
messageDetails[2] = Message
Please comment on if you the code is not working for you or incase you need more clarifications

Great!
I’ll look for any old phone and connect it to my computer using Bluetooth, and try this out.
Thank you!
Nice.
I’m having doubt.Without using Gateway and GSM i want to simulate send and receive sms application(Monitoring application).I want to implement these features in C# with oops concepts.Could you please help me and give any source codes.
nice .
very good work but i was looking for auto detecting new sms may you help me??
Nice work
can u use this to send sms or mms to a website, like twitter function, I wanna sms like ( I am dancing all drunk at Movida in london) to a what Am i doing right now site
is this in anyway possible???
Thx Andreas
Looks great, but my knowledge in this is poor. Could I ask You too please provide the code for a simple demo?
Erik
Can u assist me in building up the web service.
I am having some problem in combining your code to my website.
Regards
Rishidevdas
Yeah sure..My pleasure.,…Thanks for visiting my site….Could you comment me t details
can u plz mention the phone u used
for connecting…..
can i connect my mobile using data cable….
thanks…
excellent work!!!!!!
i will try out this code.
what exactly do v need to change code other then COM PORT NUMBER and MESSAGE CENTER NUMBER.
Thanks a lot