0

Hello Friends,

I am trying this code to receive SMS through my GSM Modem but I just get this:

AT+CMGL="ALL"

OK

in the text2 box

Please help

Private Sub Command2_Click()
Dim buffer
If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
With MSComm1
.CommPort = 3
.Settings = "9600,N,8,1"
.InputLen = 0
.Handshaking = comNone

.PortOpen = True
End With
MSComm1.Output = "AT" & vbCrLf
Do
DoEvents
buffer = MSComm1.Input
Loop Until InStr(buffer, "OK")
buffer = ""
MSComm1.Output = "AT+CMGF=1" & vbCrLf
Do
DoEvents
buffer = MSComm1.Input
Loop Until InStr(buffer, "OK")
buffer = ""
MSComm1.Output = "AT+CMGL=" & Chr(34) & "ALL" & Chr(34) & vbCrLf
Do
DoEvents
buffer = buffer & MSComm1.Input
Loop Until InStr(buffer, "OK")

Text2.Text = buffer
End Sub

Thanking u all in advance.

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by VIeditorlover
0

RTFM. If you have not any you should have a software from modem vendor so do little reverse engineering - line dump when receiving sms manually and find secret of the steel.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.