Hi All,
I was doing SMS simple project with C# window application . I used GSM modem device to send message.Firstly I chose modem port and the connection was done successfully but when I tried to send a SMS ,
I got error " (GsmComm.GsmCommunication.CommException)" .
//Code
Operation code = new Operation();
try
{
txtNumber.Text = "0973118993";
Cursor.Current = Cursors.WaitCursor;
txtMessage.Text = "Respected " + txtDonorName.Text + ", Welcome to Clapp Trust. Your donor ID is " + txtDonorId.Text + ". Our online system will send you SMS whenever your donation is received.";
try
{
SmsSubmitPdu pdu;
byte dcs = (byte)DataCodingScheme.GeneralCoding.Alpha7BitDefault;
pdu = new SmsSubmitPdu(txtMessage.Text, Convert.ToString(txtNumber.Text), dcs );
int times = 1;
for (int i = 0; i < times; i++)
{
comm.SendMessage(pdu);
}
}
catch (Exception ex)
{
MessageBox.Show("Modem is not available");
}
}
catch
{
MessageBox.Show("SMS not send");
}
What's the problem?