Problem with Extracting SMS from GSM
Discussion in "Project Doubts" started by aanbarasan Dec 6, 2013.
Fri Dec 06 2013, 09:11 pm
I am doing project on SMS display in 16x2 LCD using 8051 and SIM300 GSM Modem.
On receiving SMS i got following response from GSM Modem.
+CMT: "+91987654321","shiva","13/12/03,11:01:25+22"
testmessage
On receiving SMS i got following response from GSM Modem.
+CMT: "+91987654321","shiva","13/12/03,11:01:25+22"
testmessage
For extracting the SMS text i used following code, but LCD is not displaying any text on receiving new SMS. On initialization of LCD i have put test string as "Welcome GSM" which is displayed correctly. Are there any need to look for Carriage Return and Line Feed from GSM response?...
while(value!='+'); while(value!='C'); while(value!='M'); while(value!='T'); while(value!=':'); while(value!='"'); while(value!='\n'); lcddata(value); //write value to LCD
Fri Dec 06 2013, 10:21 pm
Where does "value" come from ?
We need to see the rest of your code, can you attach it, perhaps as a zip file.
We need to see the rest of your code, can you attach it, perhaps as a zip file.
aanbarasan like this.
Sat Dec 07 2013, 10:43 am
In this forum search for 8051 GSM project you will find many good information regarding interrupt based SMS extraction
aanbarasan like this.
Sun Dec 08 2013, 07:11 pm
@aanbarasan can you send the codes i am also doing a project as yours.... maybe we could help each other.
Tue Dec 10 2013, 09:13 pm
Sorry for delayed reply..i have gone through some of the threads and found out the problem in my code..Initially i was directly displaying the LCD with strings from "Array1" which stores the SBUF values..Now i have added "Array2" for temporarily storing the and displaying contents from Array1 to Array2..
Initial code was:
Modified part of code was:
Initial code was:
while(value!='+'); while(value!='C'); while(value!='M'); while(value!='T'); while(value!=':'); while(value!='"'); while(value!='\n'); for(count=0;count<32;count++) { msg[count]=Rx_data(); if(msg[count]=='\r') break; lcddata(value); //write value to LCD }
Modified part of code was:
for(k=0;k<32;k++) { store[k]= msg[k]; lcddata(store[k]); }
Mon Dec 16 2013, 03:40 am
for easier extraction you can put your message in a start and end character e.g. @Your message#
you can wait till you get @ after that read everything in buffer till you get #.
you can wait till you get @ after that read everything in buffer till you get #.
Powered by e107 Forum System