如何使用C#AT命令执行如何使用、命令、AT

2023-09-04 22:38:13 作者:戰狼王

我想知道如何在C#中使用AT + CLCC命令,以及如何监控在控制台的反应? 我试着用以下的code,但并没有得到progress.i已经试过这种因此far.It没有给出任何回应。

I want to know how to use AT+CLCC command in c# and how to monitor responses in a console ? I tried with following code But didn't get progress.i already have tried this so far.It doesn't give any response.

这是我的code:

_serialPort.WriteLine("AT+CLCC");

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

Console.WriteLine("Check this......:" + responce);

我应该怎么办呢?

how should i do it?

推荐答案

我很久以前失去了几天这一点。

I lost a couple of days on this a long time ago.

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

Use the DataReceived event to receive data from a serial port.

SerialPort.DataReceived事件