I'm developing an application that integrates a GPS application (implemented
in C++ using WM6 SDK) that should send a SMS to a Midlet application wich is
a tracking application. In this journey I faced what seems to be a tough
problem: I need to send an SMS from a C++ application to a Midlet application
with the GPS coordinates.
It seems to be easy at first glance but as the J2ME community knows, Midlet
applications can only receive messages that comes to a specific port number
registered by the application.
I know to which port number I have to send the damm message, but WM6 SDK SMS
API doesn't even mention a "port number". So I don't know how to specify it
to the SmsSendMessage function.
My guess is that it has to be encoded in the pbProviderSpecificData
SmsSendMessage parameter, but I've tried the code below to prepare the "TP
User Data" as described here:
http://newlc.com/Sending-a-message-from-Symbian-C.html with no luck:
// Set up provider specific data
memset(&tpsd, 0, sizeof(tpsd));
tpsd.dwMessageOptions = bSendConfirmation ? PS_MESSAGE_OPTION_STATUSREPORT
: PS_MESSAGE_OPTION_NONE;
tpsd.psMessageClass = PS_MESSAGE_CLASS1;
tpsd.psReplaceOption = PSRO_NONE;
tpsd.fMessageContainsEMSHeaders = 1;
// see pp. 62 in SMS spec 0340_740.pdf document
tpsd.dwHeaderDataSize = 6;
tpsd.pbHeaderData[0] = 0x05; // UDH IE (Information Element) identifier 5
(16 bit port number)
tpsd.pbHeaderData[1] = 0x04; // port number IE length
tpsd.pbHeaderData[2] = 0x12; // destination port
tpsd.pbHeaderData[3] = 0x13; //
tpsd.pbHeaderData[4] = 0x12; // source port
tpsd.pbHeaderData[5] = 0x14; //
Does any one has faced this problem before or could point me to the right
direction?
Any comment on this is welcome.
Thanks in advance.
Archived from group: microsoft>public>pocketpc>phone_edition