--- smsdaemon/tester.cpp 2008/06/11 21:18:04 60 +++ smsdaemon/tester.cpp 2008/06/13 06:38:43 69 @@ -24,7 +24,8 @@ cout << "----- test_sms( " << len << " ) ------- " << endl; string msg = Util::str_formatint(len); - msg.append(len - msg.length(), '-'); + msg.append(1, ' '); + msg.append(len - msg.length(), 'a'); vector pdu = SmsPdu::CreateSmsPdu("4522337617", msg, true); @@ -41,6 +42,17 @@ int main() { + string pdu = "06915404950000040A91542233677100008060211202528009AB61F3C8D481622C"; + + SMS sms = SmsPdu::ParseSmsPdu(pdu); + + cout << "Sender " << sms.sender << endl; + cout << "Time " << sms.timestamp << endl; + cout << "Msg. " << sms.message << endl; + + return 0; + + SerialPort port("/dev/ttyS1" ); port.Open( SerialPort::BAUD_9600, SerialPort::CHAR_SIZE_8, @@ -52,8 +64,13 @@ modem.Init(); test_sms(modem, 161); +/* + vector pdu = SmsPdu::CreateSmsPdu("4522337617", "Hej med dig, igen", true); + cout << "Len: " << pdu[0].len << endl; + cout << "Pdu: " << pdu[0].pdu << endl; - + modem.SendSmsPdu(pdu[0].pdu, pdu[0].len); +*/