Last post Nov 06, 2012 11:04 PM by santosh.jagdale
Nov 06, 2012 05:49 AM|Nasir Hussain 786|LINK
Hello Experts, i have googled a lot that how to send sms from asp.net application without buying any device or gateway to send sms.
finally i got the idea it is possible with AT Commands C#, and i find an excellent article from CodeProject that is
i download this project and run, but it is not sending any message, every time there is a exception message "No data received from phone" at this section
public string ReadResponse(SerialPort port,int timeout)
string buffer = string.Empty;
if (receiveNow.WaitOne(timeout, false))
string t = port.ReadExisting();
buffer += t;
if (buffer.Length > 0)
throw new ApplicationException("Response received is incomplete.");
throw new ApplicationException("No data received from phone.");
while (!buffer.EndsWith("\r\nOK\r\n") && !buffer.EndsWith("\r\n> ") && !buffer.EndsWith("\r\nERROR\r\n"));
catch (Exception ex)
Nov 06, 2012 06:06 AM|santosh.jagdale|LINK
1. if you want free sms provider you can use way2sms API to send sms.
2. About your error, have you connected Modem correctly?
You check response from GSM modem from hyper terminal.
Sent AT command, if you get OK respose then your GSM modem is connected correctly.
Nov 06, 2012 06:25 AM|Nasir Hussain 786|LINK
have you connected Modem correctly?
it means i have to connect my cell phone in order to send message ? but when i run the application i can easily get connected status that you are connected with Com1 port. i didn't connect my cellphone with the PC.
Yesterday i installed hyperTerminal, it is showing message OK but now i uninstall Hyper Terminal and still i am connecting using Asp.net app.
why should i install Hyper Terminal ?
Nov 06, 2012 06:33 AM|santosh.jagdale|LINK
The example you are refering, need GSM modem to connect at serial port.
In this example there are various GSM AT commands which are sent to GSM modem to handle it.
Nov 06, 2012 06:37 AM|Nasir Hussain 786|LINK
if you don't mind can you answer these
should i connect my cell phone in order to send message ?
should i install Hyper Terminal for this?
Nov 06, 2012 11:04 PM|santosh.jagdale|LINK
I never tried to send sms thorugh Cell phone.
But I am sure about GSM Modem, that GSM modem must need to connect at serial port.
And hyper terminal is optinal, it just used to check response from serial port.
But why don't you try way2sms API, as i given above.