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. 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. 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 d开发者_运维技巧edicated console) but I would like to manage the response in the sense that I would do something like that
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.
精彩评论