Shop OBEX P1 Docs P2 Docs Learn Events
GSM Module to Basic Stamp control? — Parallax Forums

GSM Module to Basic Stamp control?

Hoodz91Hoodz91 Posts: 2
edited 2009-07-23 20:52 in BASIC Stamp
I am having trouble with interphasing a tellit GSM module with a Basic Stamp. I am trying to read the last·SMS on the SIM card and then have the basic stamp use the·character from the last SMS·to run a certain subroutine from my program.

I am able to send a text message using AT commands comined with pbasic·here is an example:
' {$STAMP BS2}
' {$PBASIC 2.5}
sData  VAR Byte
SEROUT 2,84,    [noparse][[/noparse]"at#bnd=1",CR]          ' Sets for US network
PAUSE 1000
SEROUT 2,84,    [noparse][[/noparse]"AT+CMGF=1",CR]       ' Sets the module in voice mode  (AT+CMGF=1 IS TEXT MODE FCLASS)
PAUSE 1000
SEROUT 2,84,    [noparse][[/noparse]"ats0=2",13]                ' Sets to
PAUSE 1000
SEROUT 2,84, [noparse][[/noparse]"AT+CLIP=1",CR]                 ' Sets to show caller ID (if you want)
PAUSE 1000
SEROUT 2, 84, [noparse][[/noparse]"AT+CMGS=+12345678910",CR]
PAUSE 5000
SEROUT 2, 84, [noparse][[/noparse]"hello world",26]
PAUSE 1000
Do
  SERIN 1,84, [noparse][[/noparse]DEC sData]                     ' Also note, I used PIN 1 to receive data from the other GSM Module
  DEBUG sData
  PAUSE 5000
Loop
  END

As I said before, I am really interested in recieveing SMS messages that can direct my program to the call the proper subroutine.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-23 20:52
    What is the format of the data you expect back from the module when you send "hello world",26 and wait for a second before trying to receive the response? Note that the Stamp will ignore anything sent from the GSM module during the PAUSE. That's just the nature of the SERIN statement and the Stamp. It can only do one thing at a time.
Sign In or Register to comment.