i have attached the code to receive sms.first i am running initialise code where i am using the command at+cnmi=2,1,0,0,1.then i am running receive sms code. but it has some problem. i have also attached the front panel of receive sms(please see through read buffer). gsm i am using is mc35i.can anyone please find a solution
I think you need to post some more information - what is the actual error/problem you are getting?
I took a quick look at your code - why are you initialising and closing the serial port inside the loop? You should move the 'open serial port' and 'close' functions outside of the loop.
Also, in your string constants you have "\r\n" but you have the display type set to 'normal display', this means the "\r\n" is the literal characters "\", "r", "\" and "n" rather than a carriage return and line break.
The fact the data received is essentially garbage makes me think that you have the wrong serial configuration (e.g. baud rate, parity etc.).