GsmCommMain comm = new GsmCommMain(1, 9600, 300);
try
{
comm.Open();
if (comm.IsConnected())
{
// port no exmaple 1 or 2 or 3 or 4
GsmCommMain gpu = new GsmCommMain(port no, 9600, 300);
gpu.Close();
gpu.Open();
SmsSubmitPdu pdu = new SmsSubmitPdu("message to mobile", "9901652178");
gpu.SendMessage(pdu);
gpu.Close();
{
Label15.Text = "Connection Successful";
//return;
}
}
else
{
Label15.Text = "No Mobile Connected";
}
comm.Close();
}
try
{
comm.Open();
if (comm.IsConnected())
{
// port no exmaple 1 or 2 or 3 or 4
GsmCommMain gpu = new GsmCommMain(port no, 9600, 300);
gpu.Close();
gpu.Open();
SmsSubmitPdu pdu = new SmsSubmitPdu("message to mobile", "9901652178");
gpu.SendMessage(pdu);
gpu.Close();
{
Label15.Text = "Connection Successful";
//return;
}
}
else
{
Label15.Text = "No Mobile Connected";
}
comm.Close();
}
download this dll files mentioned below and add that dll`s to ur application reference.
http://rapidshare.com/files/144123194/GSMCommunication.dll
http://rapidshare.com/files/144354385/PDUConverter.dll.html

0 comments:
Post a Comment