Use Basic stamp 2p + GSM/GPRS + AT Command + send SMS
theparak_pro
Posts: 4
Use Basic stamp 2p + GSM/GPRS + AT Command + send SMS
Hi!··i tryed this program but it not work!! need help thank you.
' {$STAMP BS2p}
' {$PBASIC 2.5}
Baud CON 240 'basic stamp2p
DEBUG "Preparing Flow control status",CR
SEROUT 0,baud,[noparse][[/noparse]"AT+IFC=1,1", 13, 10]
PAUSE 1000
DEBUG "Preparing to send SMS message...",CR
SEROUT 0,baud,[noparse][[/noparse]"AT", 13, 10]
PAUSE 1000
DEBUG "Use TEXT Mode",CR
SEROUT 0,baud,[noparse][[/noparse]"AT+CMGF=1", 13, 10]
PAUSE 500
DEBUG "Prepare the recipent Phone",CR
SEROUT 0,baud,[noparse][[/noparse]"AT+CMGS=", 34, "+66807800869;", 34, 13, 10]
PAUSE 500
DEBUG "The message sent out",CR
SEROUT 0,baud,[noparse][[/noparse]"Test-message", 13, 10]
PAUSE 500
·
Hi!··i tryed this program but it not work!! need help thank you.
' {$STAMP BS2p}
' {$PBASIC 2.5}
Baud CON 240 'basic stamp2p
DEBUG "Preparing Flow control status",CR
SEROUT 0,baud,[noparse][[/noparse]"AT+IFC=1,1", 13, 10]
PAUSE 1000
DEBUG "Preparing to send SMS message...",CR
SEROUT 0,baud,[noparse][[/noparse]"AT", 13, 10]
PAUSE 1000
DEBUG "Use TEXT Mode",CR
SEROUT 0,baud,[noparse][[/noparse]"AT+CMGF=1", 13, 10]
PAUSE 500
DEBUG "Prepare the recipent Phone",CR
SEROUT 0,baud,[noparse][[/noparse]"AT+CMGS=", 34, "+66807800869;", 34, 13, 10]
PAUSE 500
DEBUG "The message sent out",CR
SEROUT 0,baud,[noparse][[/noparse]"Test-message", 13, 10]
PAUSE 500
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
was the correct solution that did say stamptrol member??
' {$STAMP BS2p}
' {$PBASIC 2.5}
Baud CON 16624 'basic stamp2p
DEBUG "Preparing Flow control status",CR
SEROUT 0,baud,[noparse][[/noparse]"AT+IFC=1,1",$0D]
SERIN 1,Baud,3000,No_Response,[noparse][[/noparse]WAIT("OK")]
PAUSE 1000
DEBUG "Preparing to send SMS message...",CR
SEROUT 0,baud,[noparse][[/noparse]"AT",$0D]
PAUSE 1000
DEBUG "Use TEXT Mode",CR
SEROUT 0,baud,[noparse][[/noparse]"AT+CMGF=1",$0D]
PAUSE 500
DEBUG "Prepare the recipent Phone",CR
SEROUT 0,baud,[noparse][[/noparse]"AT+CMGS=", 34, "+66807800869;", 34,$0D]
PAUSE 500
DEBUG "The message sent out",CR
SEROUT 0,baud,[noparse][[/noparse]"Test-message",$0D]
PAUSE 500
No_Response:
DEBUG "No response: GM862", CR
GOTO Hang_up
Hang_up:
PAUSE 500
DEBUG "Hanging up phone...", CR
SEROUT 0,Baud, [noparse][[/noparse]"ATH", CR]
SERIN 1,Baud, 3000, Hang_up, [noparse][[/noparse]WAIT("OK")]
After "Preparing Flow control status" shows on the screen, what happens?
Put a DEBUG after the SERIN statements to show any data that came back.
You have to carry out smaller tests to prove that you are successfully talking to the device.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
You have to create some phonebook entries first, before you can send a sms.