--- smsdaemon/GsmModem.cpp 2008/06/11 16:14:28 58 +++ smsdaemon/GsmModem.cpp 2008/06/11 19:42:24 59 @@ -4,7 +4,6 @@ #include #include -#include #include #include @@ -120,6 +119,27 @@ return retval; } + +void GsmModem::SendSmsPdu(std::string pdu, int len) //pdu inclussive leading "00" +{ + Common::instance()->logMessage( string("SMS pdu send") ); + + Command("AT+CMGF=0"); + Util::Sleep(2); + + string line1 = "AT+CMGS="; + line1.append( Util::str_formatint(len) ); + line1.append("\r"); + + + Command(line1,"> "); + + pdu.append("\032"); // \032 == Ctrl+Z + Command( pdu ); + Util::Sleep( 50 ); + Common::instance()->smsCounter.outgoing++; +} + void GsmModem::SendSms(string to, string message) { Common::instance()->logMessage( string("SMS send to ") + to); @@ -188,3 +208,5 @@ //Enter pin code ?? } + +