简体   繁体   English

管理 GSM 调制解调器响应

[英]Manage GSM Modem response


I'm creating a small program in Visual Basic, using Visual Studio 2010, which communicates with a GSM modem via serial port.我正在使用 Visual Studio 2010 在 Visual Basic 中创建一个小程序,该程序通过串行端口与 GSM 调制解调器通信。 The connection works, I can even communicate properly with the modem and I can also send sms and mms.. But I can not handle the modem answers... I'll explain: If I send a command like AT + CSQ modem replies with + CSQ 22.0.连接正常,我什至可以与调制解调器正常通信,也可以发送短信和彩信。但我无法处理调制解调器的回答......我会解释:如果我发送类似 AT + CSQ 调制解调器回复的命令+ CSQ 22.0。 This command gives me the value of the signal as a response on a scale of 0-30... I can see on the screen (in a dedicated console) but I would like to manage the response in the sense that I would do something like that该命令将信号的值作为 0-30 范围内的响应提供给我......我可以在屏幕上看到(在专用控制台中),但我想在我会做某事的意义上管理响应像那样

IF (answer.text = "+CSQ 22,0") Then 
      label1.text = "Good"
ELSE
       label1.text = "Bad"
END IF

Is it possible?可能吗?

Try using SerialPort ReadLine method to get the response to the command you send.尝试使用 SerialPort ReadLine 方法来获取对您发送的命令的响应。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM