gsmopen: added proof of concet to send pdu messages via gsmlib

This commit is contained in:
Giovanni Maruzzelli 2012-04-17 22:54:54 +02:00
parent 1f664b68f4
commit a621cdee99
2 changed files with 21 additions and 1 deletions

View File

@ -1,6 +1,6 @@
MODNAME=mod_gsmopen MODNAME=mod_gsmopen
SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"' SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"'
LOCAL_CFLAGS += $(SVNDEF) -I../../../../libs/spandsp/src -I../../../..//libs/tiff-3.8.2/libtiff LOCAL_CFLAGS += $(SVNDEF) -I../../../../libs/spandsp/src -I../../../..//libs/tiff-3.8.2/libtiff
LOCAL_LDFLAGS=-L../../../../libs/spandsp/src -lspandsp -lctb-0.16 LOCAL_LDFLAGS=-L../../../../libs/spandsp/src -lspandsp -lctb-0.16 -lgsmme
LOCAL_OBJS=gsmopen_protocol.o LOCAL_OBJS=gsmopen_protocol.o
include ../../../../build/modmake.rules include ../../../../build/modmake.rules

View File

@ -1685,6 +1685,26 @@ read:
//servicecentretimestamp = sms->serviceCentreTimestamp(); //servicecentretimestamp = sms->serviceCentreTimestamp();
//sender_recipient_address = sms->address(); //sender_recipient_address = sms->address();
#ifdef NOTDEF_SENDING_EXAMPLE
SMSMessageRef smsMessage;
// message text has probably to be in 8859-1
smsMessage = new SMSSubmitMessage("submit me ", "3472665618");
cout << smsMessage->toString() << endl;
string pdu = smsMessage->encode();
cout << pdu << endl;
//cout << intToStr(pdu.length() / 2 - getSCAddressLen()) << endl;
cout << intToStr(pdu.length() / 2 - 1) << endl;
/*
string pdu = encode();
Parser p(_at->sendPdu("+CMGS=" +
intToStr(pdu.length() / 2 - getSCAddressLen()),
"+CMGS:", pdu));
*/
#endif// NOTDEF_SENDING_EXAMPLE
#endif// WANT_GSMLIB #endif// WANT_GSMLIB