--- smsdaemon/GsmModem.cpp 2008/06/10 12:58:30 33 +++ smsdaemon/GsmModem.cpp 2008/06/10 13:29:19 34 @@ -44,18 +44,20 @@ return str; } + string GsmModem::Command(string command, string term) { time_t start,now; start = time(0); - command.append("\r"); + if (term != "> ") + command.append("\r"); //Dont append CarriageReturn if sending SMS + m_port.Write(command); - Util::Sleep(25); + Util::Sleep(1); string response = GetResponse(); - unsigned int tlen = term.length(); while ( 1 ) { @@ -66,7 +68,7 @@ } response += GetResponse(); - Util::Sleep(25); + Util::Sleep(1); now = time(0); if ( (now-start) > 10 ) @@ -74,8 +76,6 @@ Common::instance()->logMessage( string("GsmModem::Command time out --") + command); break; } - - } Util::Sleep(5); @@ -133,7 +133,7 @@ Command(line1,"> "); - message.append("\032\r"); // \032 == Ctrl+Z + message.append("\032"); // \032 == Ctrl+Z Command(message); Util::Sleep(50); //Give the modem some time to send the sms and be ready again