Atmega16 not receiving complete response on serial from GSM sim300


i working on gsm sim300. want receive sms on serial port of atmega16. when send sms " *23# "to gsm modem send, 
" \r\n+cmgr:\s"rec\sunread","+919762148043",,"14/03/13,23:04:32+22"\r\n*23#\r\n\r\nok\r\n "
this string in response. parsing string using logic
code: [select]

while(serial.available())
  {
    char tempchar = serial.read();
    if(tempchar == '+')
    {
      ispresms = true;
      lcd.print('+');
    }
    else if((tempchar == '\r') && (ispresms == true))
    {
      ispresms = false;
      lcd.print('r');
    }
    else if(tempchar == '*')
    {
      digitalwrite(okled, high);
      issms = true;
      lcd.print('*');
    }
    else if((tempchar == '#') && (issms == true))
    {
      digitalwrite(powerled, high);
      issms = false;
      lcd.print(sms);
    }
    else if(issms)
    {
      digitalwrite(alertled, high);
      sms += tempchar;
    }
  }
  lcd.print('@');
}

i expecting "  +++r*23@" on lcd display, getting " +++r@".
it means controller receive
" \r\n+cmgr:\s"rec\sunread","+919762148043",,"14/03/13,23:04:32+22"\r\n "
this of string. got stuck here. gsm send complete string(i verified that) controller not receiving complete. please help.



Arduino Forum > Using Arduino > Microcontrollers > Atmega16 not receiving complete response on serial from GSM sim300


arduino

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support