void GSM3ShieldV1SMSProvider::manageResponse(byte from, byte to) { switch(theGSM3ShieldV1ModemCore.getOngoingCommand()) { /* case XON: if (flagReadingSocket) { // flagReadingSocket = 0; fullBufferSocket = (theGSM3ShieldV1ModemCore.theBuffer().availableBytes()<3); } else theGSM3ShieldV1ModemCore.openCommand(this,NONE); break; */ case NONE: theGSM3ShieldV1ModemCore.gss.cb.deleteToTheEnd(from); break; case BEGINSMS: beginSMSContinue(); break; case ENDSMS: endSMSContinue(); break; case AVAILABLESMS: availableSMSContinue(); break; case FLUSHSMS: flushSMSContinue(); break; } }
//Send SMS begin function. int GSM3ShieldV1SMSProvider::beginSMS(const char* to) { if((theGSM3ShieldV1ModemCore.getStatus() != GSM_READY)&&(theGSM3ShieldV1ModemCore.getStatus() != GPRS_READY)) return 2; theGSM3ShieldV1ModemCore.setPhoneNumber((char*)to); theGSM3ShieldV1ModemCore.openCommand(this,BEGINSMS); beginSMSContinue(); return theGSM3ShieldV1ModemCore.getCommandError(); }
int SIM808SMSProvider::beginSMS(const char* to){ if ((SIM808ModemCore_t.getStatus() != SIM808_READY) && (SIM808ModemCore_t.getStatus() != GPRS_READY)){ return 2; } SIM808ModemCore_t.setPhoneNumber((char*)to); SIM808ModemCore_t.openCommand(this,BEGINSMS); beginSMSContinue(); return SIM808ModemCore_t.getCommandError(); }
void SIM808SMSProvider::manageResponse(int from, int to) { switch (SIM808ModemCore_t.getOngoingCommand()){ case NONE: SIM808ModemCore_t.gss.cb.deleteToTheEnd(from); break; case BEGINSMS: beginSMSContinue(); break; case ENDSMS: endSMSContinue(); break; case AVAILABLESMS: availableSMSContinue(); break; case FLUSHSMS: flushSMSContinue(); break; } #if ANDYDEBUGx Serial.println("SMS getOngoingCommand..."); Serial.println(SIM808ModemCore_t.getOngoingCommand()); #endif }