Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send SMS Siemens M20 Modem

Status
Not open for further replies.

TanTrazz

Programmer
Aug 18, 2001
54
NL
Hi All,

Im trying to send an sms with via trough an Siemens M20 Modem but i can't get it working. This is my code:
Code:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Form_Load()

MSComm1.Settings = "9600,n,8,1" 'Change this with the Baud rate of your modem (The one you use with Hyper Terminal)
MSComm1.CommPort = 1 ' Change this with the port your Modem is attached
MSComm1.PortOpen = True

End Sub

Private Sub Command1_Click()
MSComm1.Output = "AT+CMGF=1" & Chr$(13) & Chr(10)
Sleep 500
MSComm1.Output = "AT+CMGS=+1212121112" & vbCrLf
Sleep 1000
Label1.Caption = MSComm1.Input
MSComm1.Output = "Hello This is my test message" & Chr(26)
Sleep 2000
If InStr(MSComm1.Input, "OK") Then
MsgBox "Message Send"
Else
MsgBox "Message Not Send"
End If

End Sub
It won't send the sms....

Tantrazz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top