I tried to send commands to a GSM modem or phone with C# using this code but it`s not working! Can anybody tell me what should I do ?
SerialPort sp = new SerialPort();
sp.PortName = "COM42";
sp.Open();
sp.Write("ATD09364191752");
I tried to send commands to a GSM modem or phone with C# using this code but it`s not working! Can anybody tell me what should I do ?
SerialPort sp = new SerialPort();
sp.PortName = "COM42";
sp.Open();
sp.Write("ATD09364191752");
sp.Flush()
, so the command may be getting stuck in a buffer. Try adding this call after the Write()
call.You are relying on all default settings for baud-rate, handshake protocols etc. You may want to check the modem docs about those.