A C# Class to work with AT commands?

一个人想着一个人 提交于 2019-12-04 11:07:59

Try this one: GSM Communication Library. Apart from built in commands it allows you to send any command you need.

I hope this also help you. This is c# code to send AT commands to your com port device (mobile phone, etc) This can be used to send sms, etc

//Send SMS
SerialPort serialPort = new SerialPort();
serialPort.BaudRate = 56700;
serialPort.PortName = "COM3";
serialPort.Open();
serialPort.WriteLine("AT+CMGF=1" + Environment.NewLine);//Set Message Format
serialPort.WriteLine("AT+CMGS=" + PhoneNumber + (char)(26));
serialPort.WriteLine(MyMessage + System.Environment.NewLine);
serialPort.Close();
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!