0

I am able to dial a gsm modem with at command "atd". But failed to detect the status (i.e. whether the dialed number is ringing or something else). Here is my code-

code for dialing-

ModemPort.WriteLine("atd" + number + ";\r\n");

Code for getting the status-

private void ModemPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
    string RcvdData = ModemPort.ReadLine(); 
}

The variable RcvdData contains only the following string-

^ORIG:1,0
^CONF:1

I am using huawei e1550 modem.

Any help?

s.k.paul
  • 7,099
  • 28
  • 93
  • 168
  • What library are you using ? Or is `ModemPort` some .NET namespace I do not know about ? – Francis Ducharme Jan 31 '14 at 16:43
  • ModemPort is an instance of SerialPort class. – s.k.paul Feb 01 '14 at 07:07
  • Maybe what you are looking for is in the stream and not in the input buffer ? `ReadLine` only looks in the buffer, not the stream. Try `ReadExisting` http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.readexisting(v=vs.110).aspx – Francis Ducharme Feb 01 '14 at 15:02

0 Answers0