i am using GSMComm library and modem to create simple program SMS Sender, when i press the button Send in my winform a got a message debug in my VS2012.
The phone reports an unspecified error. This typically happens when a command is not supported by the device, a command is not valid for the current state or if a parameter is incorrect.
this my code
private void btnSend_Click(object sender, EventArgs e)
{
var port = "COM3"; // default port to connect modem wavecom
var baudRate = 115200;
var timeout = 300;
var comm = new GsmCommMain(port, baudRate, timeout);
try
{
var msg = txtIsiPesan.Text;
var phoneNumber = txtNoTujuan.Text;
comm.Open();
SmsSubmitPdu pdu = new SmsSubmitPdu(msg, phoneNumber, "");
comm.SendMessage(pdu); //debug found error here
comm.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "error");
}
}