When designing an application to access a modem using AT commands, you should always remember that modems are slower than your application. to avoid overloading a modem especially when sending bulk SMS, you should check modem input always for OK or ERROR response. Modems will always respond to AT commands with either OK or ERROR.