使用AT命令的短信

时间:2019-12-26 09:14:24

标签: vb.net at-command

我正在使用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

有什么主意吗?请帮忙。预先感谢。

请参阅所附图片。

Method to send sms pix Recieved Text pix

0 个答案:

没有答案