如何使用c#执行AT命令

时间:2014-02-10 16:09:10

标签: c# .net

我想知道如何在c#中使用AT + CLCC命令以及如何在控制台中监控响应? 我尝试使用以下代码。但是我无法取得进展。这是我迄今为止所做的尝试。它没有给出任何回应。

这是我的代码:

_serialPort.WriteLine("AT+CLCC");

string responce = "";
responce = responce + _serialPort.ReadLine();

Console.WriteLine("Check this......:" + responce);
我应该怎么做?

1 个答案:

答案 0 :(得分:2)

很久以前,我在这里失去了几天。

使用DataReceived事件从串行端口接收数据。

SerialPort.DataReceived Event

相关问题