serial port - making call from gsm modem in C# -
I want to call GSM modem using C # I've written the following code, but I'm unable to call. Please tell me what the mistake is also tell me how to handle the response to the code from the modem so that I can display the message like "Call connecting" or "Can not connect".
Private Zero Button 1_Click (Object Sender, EventsErgus E) {Serial Port PO = New Serial Port (); Po.PortName = "COM3"; Po.BaudRate = int.Parse ("9600"); Po.DataBits = Convert toInt32 ("8"); Po.Parity = Parity.None; Po Port = stop One; Po.ReadTimeout = int.Parse ("300"); Po.WriteTimeout = int.Parse ("300"); Po.Encoding = Encoding.GetEncoding ("iso-8859-1"); Po.Open (); Po.DtrEnable = true; Po.RtsEnable = true; Po.DataReceived + = New SerialDataReceivedEventHandler (Port_DataReceived); Po.Write ("ATD9030665834;"); } Public Zero Port Data Reassembled (Object Sender, Serial Data ResourceAgent Eg E) {if (e.EventType == SerialData.Chars) {// What is the response to write here? }}
Use the port. Wrightite ("ATD" + phno + ";");
This will definitely solve your problem ..
Use the port to use the feedback. Compare to readxing () and your requirement as if it is easy :)
Good luck ..
Comments
Post a Comment