Shop OBEX P1 Docs P2 Docs Learn Events
GSM modem interfacing with Propeller — Parallax Forums

GSM modem interfacing with Propeller

fliq50fliq50 Posts: 5
edited 2010-10-22 05:13 in Propeller 1
Hi all...
i want to ask...
can this Serial to Propeller Connection (http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/SerialtoPropeller.pdf) interfacing with GSM modem? can it communicate each other?

sorry for my poor english... thanks... :)

Comments

  • TubularTubular Posts: 4,717
    edited 2010-09-29 05:19
    If the GSM modem supports RS232 (some are TTL voltage levels instead of RS232), it should work by swapping pins 2 and 3 at the 9 pin D connector.

    This is because the circuit you link to is designed to connect the Prop to a PC, which is "DTE" or Data Terminal Equipment. A modem is likely to be "DCE" or Data CommunicationEquipment, which means you need to swap over the pairs (like a Null modem does).

    I'm not sure about the reset signal (from Pin 4 on the ) - it depends on your application.
  • fliq50fliq50 Posts: 5
    edited 2010-09-29 18:51
    thanks Tubular... really appreciate it...
    i will try for my project.
  • fliq50fliq50 Posts: 5
    edited 2010-10-05 18:44
    thanks the information I got here... really useful...

    I already communicate the prob and the gsm modem. So the problem I face is to sent message to the gsm modem. The problem start with the quotation mark ( " ). How to call the quotation mark in the propeller? I try and test but seem goes wrong.. the Parallax Serial Terminal shows
    AT+CMGS=S=15551236789S=

    TRY TEST POWER,

    AT

    there also goes wrong with the control_z program to sent the message in the gsm modem...

    thanks again

    this is my test program by reference the Jay Kickliter program...

    CON
    _CLKMODE = xtal1 + pll4x
    _XINFREQ = 5_000_000
    DELAY = 0.5
    CONTROL_Z = 26
    QUOTATION_MARK = 34

    OBJ
    serial : "Parallax Serial Terminal"

    VAR
    long stack[10]
    byte text

    DAT
    phone_send_sms_command byte "AT+CMGS=", 0 ' First part of command, the rest is phone number in quotes
    at_command byte "AT", 0 ' Phone should return "OK"
    cr_nl byte 13, 10, 0 ' Carrige return + newline
    phone_number byte "15551236789", 0
    message byte "TRY TEST POWER", 0


    PUB SendSMS(recipient_phone_number, message_text)
    serial.StartRxTx(31, 30, 0, 115200)

    serial.str(@phone_send_sms_command) ' Send sms preamble, AT+CMGS=
    serial.str(QUOTATION_MARK) ' Send a "
    serial.str(@phone_number) ' Send phone number string, eg. 15551236789
    serial.str(QUOTATION_MARK) ' Send a "
    serial.str(@cr_nl) ' Send carrige return and newline control characters
    waitcnt(clkfreq/2 + cnt) ' Wait for phone to process command
    serial.str(@message) ' Send message string
    serial.str(CONTROL_Z) ' Send Control-Z character
    serial.str(@cr_nl) ' Send carrige return and newline control characters
    waitcnt(clkfreq/2 + cnt) ' Make sure phone has enough time to process command before next
    serial.str(@at_command) ' Send another AT for good measure
    serial.str(@cr_nl) ' Send carrige return, and newline control characters
    waitcnt(clkfreq/2 + cnt) ' Wait for phone to process command
  • TubularTubular Posts: 4,717
    edited 2010-10-06 04:28
    try this
    Serial.str(string(QUOTATION_MARK))
    etc

    That seems to work when I do something similar

    cheers
    tubular
  • fliq50fliq50 Posts: 5
    edited 2010-10-16 18:31
    thanks Tubular....
    U save my day... :)
    it really work...
    now I'm getting excited with the propeller...
  • TubularTubular Posts: 4,717
    edited 2010-10-20 16:03
    Great! There is so much that can be done with the prop

    The GSM modules can be frustrating; so much power, but you have to know what commands to use and in which order.
    fliq50 wrote: »
    thanks Tubular....
    U save my day... :)
    it really work...
    now I'm getting excited with the propeller...
  • fliq50fliq50 Posts: 5
    edited 2010-10-22 05:13
    Ok... I'm done with the sending messege. How about receiving message? and use the message that I sent to turn off pin 5?
    I'm use the at-command cmgr=1. So, when the gsm modem replay to the propeller, how do I know which memory in Propeller it store the message that I sent? and how to call it?

    Thanks in advance..
Sign In or Register to comment.