Question how to extract message from sms

falco88

New member
Joined
Dec 22, 2011
Messages
1
Programming Experience
Beginner
hi..
i'm actually developing monitoring application based on sms.it have 1 monitoring application and 1 for remote.my problem is how i can control the remote site from the monitoring application based on the sms that received.thanks..

here's my code..




Dim rxbuff As String

'SerialPort.Write("AT" & vbCrLf)
SerialPort.Write("AT+CMGF=1" & vbCrLf)
SerialPort.Write("AT+CMGL=""REC UNREAD""" & vbCrLf)

rxbuff = SerialPort.ReadExisting()


If rxbuff = "OFF GENERATOR" Then
Timer.Stop()
lblmtr.Text = "Motor is OFF"
End If

If rxbuff = "ON GENERATOR" Then
Timer.Start()
lblmtr.Text = "Motor is ON"
End If
 
Back
Top