Microcontroller › AVR › read and comapare message in ATmega16 › no you won’t find null
May 28, 2013 at 9:10 pm
#9851
Participant
no you won’t find null character at the end.
if u study the formatted data you are receiving from gsm modem u will find that for every command executed successfully, the last few data bytes are OKrn and for those having errors like say i am reading message from sim memory location 1 and message does not exist there
AT+CMGR=1
+CMS ERROR: 517rn
thats what you have to wait for (OKrn or error messages depending on AT commands u used).
you may need to manually put the null character for string comparision. (depends on your programming)
Happy Programming