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

New Message......

sir,

I have checked as per your suggestion.

I am using 'SIMCOM300' module.

I am receiving every new message indication from gsm module as in the form of +CMTI: "SM", index.

can I check whole string "+CMTI"?

I think it will more accurate.

but sir, still problem is that

if 2 or more sms receive sequentially then indication will be..

+cmti: "SM", 1
+cmti: "SM", 2
+cmti: "SM", 3

& my buffer size for this is only 12 bytes. so after getting string '+cmti: "SM", 1' in buffer the flag bit will set. this will know the controller that new message index is received.

thus the index will give to +cmgr command for reading new message content.

Then again the message content store in separate buffer.

but if more indication at a time, controller will save data like.... '+cmti: "sm" ok' etc
so here index will missed & controller take garbage as index

  • Don't you think the above should have been posted as a "reply" - not "start a thread" in the following thread?
    http://www.keil.com/forum/19461/

    "an I check whole string "+CMTI"?"

    Of course you can. Of course you should. + isn't only used for CMTI. And you need to process the full line to pick up the index.

    Buffer size 12 characters? That is irrelevant if you use a state machine to process characters. You don't have a need to remember characters already processed, and you can process characters faster than the modem can send them. Your storage needs is for the currently processed character, and for the index you plan to extract from the string.