mspocketpc.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sending SMSs with destination port number

 
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Phone Edition
Author Message
Snahrck



Joined: 23 Dec 2007
Posts: 3

PostPosted: Sat Dec 22, 2007 9:16 pm    Post subject: Sending SMSs with destination port number Reply with quote

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
Back to top
View user's profile Send private message
Beverly Howard [Ms-MVP/Mo



Joined: 15 Aug 2007
Posts: 6700

PostPosted: Sun Dec 23, 2007 4:26 pm    Post subject: Re: Sending SMSs with destination port number Reply with quote

suggest reposting at
news://msnews.microsoft.com/microsoft.public.pocketpc.developer

Beverly Howard [MS MVP-Mobile Devices]
Back to top
View user's profile Send private message
Snahrck



Joined: 23 Dec 2007
Posts: 3

PostPosted: Mon Dec 24, 2007 11:15 am    Post subject: Re: Sending SMSs with destination port number Reply with quote

Ok thanks.

"Beverly Howard [Ms-MVP/MobileDev]" wrote:

> suggest reposting at
> news://msnews.microsoft.com/microsoft.public.pocketpc.developer
>
> Beverly Howard [MS MVP-Mobile Devices]
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
sending out email from i700? Hello all, I have been following the threat about the sprint email problem, I have been having the same problem as the sprint person, but with verizon and the i700. I can get email from my pop account, but cannot send any out. Any suggestions?? (I tried t

O2 XDA sending multiple texts at once Hey, I was wondering if anyone can help me with this. I've got an O2 XDA II and on occasion (maybe 2 out of 5 times) it sends the same message 3 times. I've always got full or nearly full signal when I send - and when I have no free texts left, it deducts

Voice Mail number question Hi I have a T-mobile PPC 2002 Phone edition bought in USA. I am using it in India with a GSM SIMcard without any problems. When I try to use the voicemail link from Today Screen ->T-mobile the voicemail number defaults to 123. It asks me whether I want to

Specify Terminal Services Port Has anyone found a way to specify the port used for terminal services client on the Pocket PC? It does not accept the /v: command line parameter that normal terminal services uses. Jason

Alternative SMTP port in WinMobile 2003SE? Like the subject says, I need to specify an alternative SMTP port in my settings for all 5 email accounts - the local provider here (Cable Bahamas) blocks port 25 and I need to connect to my secure SMTP server (i.e. authenticated logon) to send emails. Do
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Phone Edition All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group