943,614 Members | Top Members by Rank

Ad:
May 18th, 2009
0

Receive SMS through GSM Modem

Expand Post »
Hello Friends,

I am trying this code to receive SMS through my GSM Modem but I just get this:
Quote ...
AT+CMGL="ALL"

OK
in the text2 box

Please help

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Command2_Click()
  2. Dim buffer
  3. If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
  4. With MSComm1
  5. .CommPort = 3
  6. .Settings = "9600,N,8,1"
  7. .InputLen = 0
  8. .Handshaking = comNone
  9.  
  10. .PortOpen = True
  11. End With
  12. MSComm1.Output = "AT" & vbCrLf
  13. Do
  14. DoEvents
  15. buffer = MSComm1.Input
  16. Loop Until InStr(buffer, "OK")
  17. buffer = ""
  18. MSComm1.Output = "AT+CMGF=1" & vbCrLf
  19. Do
  20. DoEvents
  21. buffer = MSComm1.Input
  22. Loop Until InStr(buffer, "OK")
  23. buffer = ""
  24. MSComm1.Output = "AT+CMGL=" & Chr(34) & "ALL" & Chr(34) & vbCrLf
  25. Do
  26. DoEvents
  27. buffer = buffer & MSComm1.Input
  28. Loop Until InStr(buffer, "OK")
  29.  
  30. Text2.Text = buffer
  31. End Sub

Thanking u all in advance.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nyt1972 is offline Offline
6 posts
since Feb 2008
May 28th, 2009
0

Re: Receive SMS through GSM Modem

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.
Reputation Points: 10
Solved Threads: 9
Junior Poster
VIeditorlover is offline Offline
137 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Extracting or Filtering in Matlab
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: datagrid to excel sheet





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC