I have designed a sms based GSM+GPS tracker using atmega328p + sim808 & by far,it is working as expected from a long time.I have implemented error handling too some extent like for example:
1)if Location fix not available,try consecutive 10 times in 30s interval & then stop the GPS part & initiate a sms to the user.
2)If there is some parsing error from the GPRMC sentence,then initiate the user.
My main concern is how to handle an unexpected error like If i don't get "OK" when issuing even the first AT command/If i don't get desired response regarding any particular AT command used/If the sim808 throws continuous garbage characters?
Should I verify every response from the sim808?How to generally overcome this kind of situation?