I am working on an SMS project. I want to read an SMS from the sim card of my phone and display it in a textbox. I have tested it on Hyperterminal and it works correctly there. When I type AT+CMGR=index of msg, the message is displayed in the following format:
+CMGR: "REC READ" , "phone no.", "date and time", "message"[/B]
OK

In my VB program I have connected my phone by a USB cable to the PC. Here's my code for the receiving section:-

MSComm2.Output = "AT+CMGR = 0" & vbCrLf

Buffer = StrConv(MSComm2.Input, vbUnicode)

Trace (Buffer)

where my Trace function is:-

Private Sub Trace(ByVal message As String) 'used to output the results on the big window

Dim strLine As String
strLine = DateTime.Now & " " & message
txtLog.Text = txtLog.Text & strLine & vbCrLf
txtLog.SelStart = Len(txtLog.Text)

End Sub

My problem is that I cannot display the message received. Instead I can only get OK. What should I do to display the +CMGR: "REC READ" , "phone no.", "date and time", "message"?? Please help me. Thanks.