我正在使用vb.net和AT命令从笔记本电脑发送短信。该程序发送一条文本消息,但收到的消息中带有AT命令。
我发送文本的方法。
Private Sub sendText()
Dim txtToSend As String = "BNCHS " & strDate & ":" & timeType & ":" & TimeOfDay
Try
For i As Integer = 1 To 2
With SerialPort1
.Write("AT+CMGS=" & contactNumber & vbCrLf)
.Write(txtToSend & Chr(26))
Threading.Thread.Sleep(100)
'MsgBox(rcvdData.ToString)
rcvdData = ""
End With
Next
Catch ex As Exception
End Try
End Sub
有什么主意吗?请帮忙。预先感谢。
请参阅所附图片。