Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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);

var msg = txtIsiPesan.Text;
var phoneNumber = txtNoTujuan.Text;
SmsSubmitPdu pdu = new SmsSubmitPdu(msg, phoneNumber, "");
comm.SendMessage(pdu); //debug found error here
catch (Exception ex)
MessageBox.Show(ex.Message, "error");

Member 13810000 30-Jun-18 5:08am    
Message Box No Phone Connected
But Mobile is Connected

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900