--- smsdaemon/GsmModem.cpp 2008/06/13 09:33:47 74 +++ smsdaemon/GsmModem.cpp 2008/06/13 10:10:06 75 @@ -2,7 +2,6 @@ */ #include - #include #include @@ -82,8 +81,6 @@ Util::Sleep(5); -// cout << response.length() << ":" << response << endl; -// DumpString(response); return response; } @@ -91,12 +88,12 @@ vector GsmModem::ReadSms(bool readAll) { - Command( "AT+CMGF=1" ); //Set SMS format to text + Command( "AT+CMGF=0" ); //Set SMS format to PDU const string search = "+CMGL: "; std::string cmd = "AT+CMGL"; if (readAll) - cmd.append("=ALL"); + cmd.append("=4"); string result = Command(cmd); @@ -113,7 +110,7 @@ string sms_entry = result.substr(0,endpos); - retval.push_back( SMS::FromRawString(sms_entry) );; + retval.push_back( SMS::FromPduString(sms_entry) );; if (endpos == string::npos) break;