This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C167 reading/scanning input from GSM module from RS232

Hello,
I am a novice in C language and have been trying to find a method of reading/scanning input from GSM, then comparing it against a text (e.g OK or ERROR). Then if true set a break.

I have tried scanf with no avail. I have also tried reading string which works but am unsure how to compare with my text.Has anyone any advice with what function would be useful?

Any replies greatly appreciated.

Andy

Parents
  • "reading/scanning input from GSM, then comparing it against a text (e.g OK or ERROR)."

    These textual messages - OK, ERROR, CONNECT, RING, etc - are designed for use by a human operator sitting at a terminal and typing commands; they are not intended for machine interpretation.

    You will make you life very much more difficult by trying to read & parse these human-oriented messages in your software.

    These messages are known as the "Verbose" (or "Verbal") forms; there is also a "Terse" (or "Numeric") mode - intended specifically for machine-oriented interactions.

    In "Terse" mode, the modem gives simple numeric code responses - much easier to handle in software!

    Look for ATV in your modem's Manual

Reply
  • "reading/scanning input from GSM, then comparing it against a text (e.g OK or ERROR)."

    These textual messages - OK, ERROR, CONNECT, RING, etc - are designed for use by a human operator sitting at a terminal and typing commands; they are not intended for machine interpretation.

    You will make you life very much more difficult by trying to read & parse these human-oriented messages in your software.

    These messages are known as the "Verbose" (or "Verbal") forms; there is also a "Terse" (or "Numeric") mode - intended specifically for machine-oriented interactions.

    In "Terse" mode, the modem gives simple numeric code responses - much easier to handle in software!

    Look for ATV in your modem's Manual

Children