Hi Everyone
I am now able to send text messeges. New Problem, I am unable to read an sent sms. Here is my code:
rea:
gosub one
serout2 tx,baud,["AT+CMGF=1",13]
Serin2 rx,baud,5000,rea,[WAIT("OK")]
pause 5000
gosub one
serout2 tx,baud,["AT+CMGR=1",13]
Serin2 rx,baud,5000,rea,[WAIT("REC UNREAD"),skip 3, STR num\12,skip 27,STR sms\10] 'CODE NEVER MOVES FORWARD FROM HERE
portc=255
pause 3000
portc=0
if sms[0]="t" and sms[1]="e" and sms[2]="s" and sms[3]="t" then
goto done
ELSE
goto rea
ENDIF
done:
serout2 tx,baud,["AT+CMGF=1",13]
Serin2 rx,baud,5000,main,[WAIT("OK")]
gosub two
gosub two
gosub two
serout2 tx,baud,["AT+CMGS=",34,"+44798XXXXXXXX",34,13]
Serin2 rx,baud,5000,main,[WAIT(">")]
PAUSE 500
SEROUT2 tx,baud,["done",26]
goto rea
Bookmarks