I am using 89s52 microcontroller to interfacing with GSM module 'SIMCOM300'. The logic which i develope is as bellow:
1) 1st i execute all commands i.e AT, AT+CMGF=1, AT+CSMS=0, AT+CPMS="SM", AT+CNMI 2) AFTER this controller will do its other operation 3) when new msg received sci receive interrupt will store '+CMTI: "SM", <index> response from gsm in buffer. 4] after this i take the index from buffer & read the corresponding msg content. 5) again the receive interrupt will occure & the whole data rcv from gsm is store in another buffer. 6) so with this i am getting the senders mobile n0.,time of sending, & actual data. 7) Depending on the actual data microcontroller will perform the action.
actual problem: 1) i am use '+' sign to check new msg indication, if '+' sign occur then next data will automatically save in buffer. but while doing this if another sms received then gsm module gives response of that message. i want this new response to store in buffer but the previous message response already fulfil the condition
so give me the solution to handle two sms received at a time by gsm module.....
That is obviously wrong - isn't it?
Look at the AT Commands manual for your module - doesn't it show that every (GSM-specific) response begins with a '+' sign...?
"give me the solution"
Why do you think you can just command people to give you stuff?
Why do you think there is just one solution?
I suggest that you look at implementing this as a State Machine; aka "Finite State Machine" - or "FSM" for short...