Receive SMS through GSM Modem

Reply

Join Date: Feb 2008
Posts: 6
Reputation: nyt1972 is an unknown quantity at this point 
Solved Threads: 0
nyt1972 nyt1972 is offline Offline
Newbie Poster

Receive SMS through GSM Modem

 
0
  #1
May 18th, 2009
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

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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 97
Reputation: VIeditorlover is an unknown quantity at this point 
Solved Threads: 5
VIeditorlover's Avatar
VIeditorlover VIeditorlover is offline Offline
Junior Poster in Training

Re: Receive SMS through GSM Modem

 
0
  #2
May 28th, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC