locked
at指令读取短信问题 RRS feed

  • 问题

  •  Function reveive_message(ByVal ComName As MSCommLib.MSComm) As String
            Dim returnstr As String = ""
            Dim receivestr As String
            ComName.InBufferCount = 0
            ComName.Output = "AT+CMGL=4" & Chr(13)
            System.Threading.Thread.Sleep(4000)
            receivestr = ComName.Input
            While receivestr.IndexOf("OK") = -1
                receivestr &= ComName.Input
            End While
        End Function
    为什么receivestr有时候能读出来,有时候不能读出来,MSCommLib.MSComm好像有些不稳定,有没有更好一点的,稳定一点的。
    2009年9月21日 1:46

答案