How to receive sms from mobile using VB

Status
Not open for further replies.

fadigigs

Newbie level 3
Joined
Oct 28, 2007
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,303
mscomm1.output = at+cmgl= & chr$(34) & all

I am using VB to receive sms from mobile. This is the code.i have tested the At commands given under on hyperterminal and i can receive the sms in it.
at
OK
at+cmgf=1
OK
at+cpms="me"
+CPMS: 2, 60, 2, 60, 2, 60

OK
at+cmgl="rec read"

I get the correct response using the first two at commands as shown above but when i send the third command on serial it sends error when i use VB.

Text1.Text = "at+cpms=" + "Me"
MSComm1.Output = Text1.Text + Chr(13)
sInput = MSComm1.Input
MsgBox sInput

i dont know what is the problem could any one please help me.
thanx.
 

u mean at+cpms give u error

do it as
MSComm1.output="AT+CPMS="
MSComm1.output=chr(34)
MSComm1.output="me"
Mscomm1.output=chr(34)
mscomm1.output=chr(13)
sInput = MSComm1.Input


hope it helps so press helped me button
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…