hi,
in our project, we are using pic 18f and modem sim 300.and we are using c18 compiler.in that i have written program for sending and receiving sms through gsm modem.when i use the AT command for reading sms, i m getting like this
AT+CMGR=1
+CMGR: "REC READ","+918108111649",,"12/07/22,14:24:11+22"
Hello
OK
here i have to read the sms "Hello", which comes before "OK".and compare it with a predefined string. i write for parsing string.but i m not getting the word "Hello". here is codes...
<code>
putrsUSART("AT\n\r");
putrsUSART("AT+CMGF=1");
putcUSART(0x0D);
Delay10KTCYx(500);
putrsUSART("AT+CMGR=1");
putcUSART(0x0D);
Delay10KTCYx(500);
if(PIR1bits.RCIF)
{
for(i=0;i<5;i++)
a[i]=getcUSART();
}
putsUSART(a);
</code>
while exicuting this, i m getting "a " as some srange characters like ?2k> or ?ï2oÈ
how can i extract the messange hello?? please help me to solve this problem.
thank you