[Latest News][6]

color C# keyword in RichTextBox
Highlight C# keyword in RichTextBox
How to Merge DataGridView Columns
How to Merge DataGridView Rows
How to Merge GridView Columns
How to Merge GridView Rows
how to send sms
Make SMS Gateway using C#.net
Merge DataGridView Columns
Merge DataGridView Rows
Merge GridView Columns
Merge GridView Rows
read sms
Send and Read SMS through a GSM Modem using AT Commands
send or read sms
sent sms
Syntax Highlighting in RichTextBox using C#

Make SMS Gateway using C#.net

Make SMS Gateway using C#.net

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.

Click Here for Download Source Code 

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

Thanks & Regard
Sham

 

About Author Mohamed Abu 'l-Gharaniq

when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries.

8 comments

  1. Hi
    Thanks for your article. How do you conect your mobile phone to a comport?

    Hossein

    ReplyDelete
  2. The following PDU does not work with your code titled: "Make SMS Gateway using C#.net" though it fine works with other online converters, am suspecting that it requires to be converted to septet since other PDU in septet format seem to have worked with the same code.

    07915276170100024414D04DAAB3F91637DFEE721E0000512070514505218D050003D40201B2A7329BFD7681B2EF3A081DB69741F2F2B89CB697C9A0EA110BAAC1602E180C6496BFDB206D9ACD4EBFDD206A798C76BFD9EF73BA3C07A16435DB0D878BD96430182C059296C3F3B75B07A216A7D4A4F3E80265DF7539C859BE839A6F719A5D0635DFEE721E141C8FDF75371D240CB3C3EE71199406

    ReplyDelete
  3. Hi, i reviewed your article "Make SMS Gateway using C#.net", it is very nice. i m trying to implement like this one, but source code download link not working.
    Could you plz send the source code ?

    ReplyDelete
  4. my email id: nathan.boomi@gmail.com

    ReplyDelete
  5. Same problem to me,, could you send the source
    a really appreciate!

    Jcruz_garciah@hotmail.com

    ReplyDelete
  6. Thanks please send me the source code too. I really appreciate this. heforus@yahoo.com

    ReplyDelete
  7. any one help me to create new sms gateway my email-id is satyendrapatel271@gmail.com

    ReplyDelete
  8. This blog is so informative for providing a valuable information about SMS API C#.

    ReplyDelete

Start typing and press Enter to search