开发者

A C# Class to work with AT commands?

Is there a class for AT communication with devices? Like a class which encapsulates AT commands into a .NET interface?

It needs to be also able to parse AT responses such as Network Lists.

开发者_C百科

Example : +COPS=? returns a list of carriers and it would take some pretty complex regex to actually parse it. Instead of writing my own lib I want to use a premade one.

AT Commands I am refereeing to are these : http://en.wikipedia.org/wiki/Hayes_command_set


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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜