提交 a621cdee authored 作者: Giovanni Maruzzelli's avatar Giovanni Maruzzelli

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

上级 1f664b68
MODNAME=mod_gsmopen
SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"'
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
include ../../../../build/modmake.rules
......@@ -1685,6 +1685,26 @@ read:
//servicecentretimestamp = sms->serviceCentreTimestamp();
//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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论