Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / End Users / SmartPhones / December 2007

Tip: Looking for answers? Try searching our database.

Sending SMSs with destination port number

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Snahrck - 23 Dec 2007 00:16 GMT
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.
Beverly Howard [Ms-MVP/MobileDev] - 23 Dec 2007 17:26 GMT
suggest reposting at
news://msnews.microsoft.com/microsoft.public.pocketpc.developer

Beverly Howard [MS MVP-Mobile Devices]
Snahrck - 24 Dec 2007 14:15 GMT
Ok thanks.

> suggest reposting at
> news://msnews.microsoft.com/microsoft.public.pocketpc.developer
>
> Beverly Howard [MS MVP-Mobile Devices]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.